- abigna
- Posts : 5
Join date : 2012-11-02
Execution hangs after clicking on Element
Tue Nov 06, 2012 8:49 pm
I have a file upload functionality. thought of using auto-it and developed the script
I have used the below script to click on choose button
driver.findElement(By.cssSelector("span.ui-button-text:contains("Choose")).click()
selenium.click("css=span.ui-button-text:contains("Choose"));
The driver.findElement is not bringing up the window where as selenium.click() brings the popup, but hangs in this step, control is not going to next step in selenium RC.
The execution got hang, there is no error message and execution is also not stopped completely.
Someone please let me know whether this can be handled in any other way. I need to submit a feasibility analysis for selenium and Iam stuck here.
I have used the below script to click on choose button
driver.findElement(By.cssSelector("span.ui-button-text:contains("Choose")).click()
selenium.click("css=span.ui-button-text:contains("Choose"));
The driver.findElement is not bringing up the window where as selenium.click() brings the popup, but hangs in this step, control is not going to next step in selenium RC.
The execution got hang, there is no error message and execution is also not stopped completely.
Someone please let me know whether this can be handled in any other way. I need to submit a feasibility analysis for selenium and Iam stuck here.
Re: Execution hangs after clicking on Element
Wed Nov 07, 2012 11:37 am
If you are using Selenium 2 then you can use sendKeys() API to send file path to upload text box. You don't need to click choose button in doing so.
- abigna
- Posts : 5
Join date : 2012-11-02
Re: Execution hangs after clicking on Element
Wed Nov 07, 2012 12:52 pm
There is no text box to enter file name.
We have choose button and a non-editable box displayed in the bottom.
Once we select the file the file details and whether it is valid or not will be displayed in the box
We have choose button and a non-editable box displayed in the bottom.
Once we select the file the file details and whether it is valid or not will be displayed in the box
- abigna
- Posts : 5
Join date : 2012-11-02
Re: Execution hangs after clicking on Element
Wed Nov 07, 2012 1:33 pm
By removing wait time on window in autoit script and placing the autoit script before button clicking, solved the issue
- ravinderreddy
- Posts : 6
Join date : 2012-11-10
Age : 37
Location : Hyderabad/Mumbai
I think as per your code U forgot to add double quote " at the end
Sat Nov 10, 2012 1:59 am
driver.findElement(By.cssSelector("span.ui-button-text:contains("Choose")).click()
selenium.click("css=span.ui-button-text:contains("Choose"));
Added double quote at the end
driver.findElement(By.cssSelector("span.ui-button-text:contains("Choose")").click()
selenium.click("css=span.ui-button-text:contains("Choose")");
if still it gives error then use
driver.findElement(By.cssSelector("span.ui-button-text:contains('Choose')").click()
selenium.click("css=span.ui-button-text:contains('Choose')");
selenium.click("css=span.ui-button-text:contains("Choose"));
Added double quote at the end
driver.findElement(By.cssSelector("span.ui-button-text:contains("Choose")").click()
selenium.click("css=span.ui-button-text:contains("Choose")");
if still it gives error then use
driver.findElement(By.cssSelector("span.ui-button-text:contains('Choose')").click()
selenium.click("css=span.ui-button-text:contains('Choose')");
- Unable to start script execution in IE browser it is showing IE Script Error with 'Yes' or 'No' buttons for Continue script execution or no.
- select an element based on another element
- Selenium sometimes hangs running htmlsuite
- WebDriver hangs loading a page with an Applet
- Selenium - Firefoox hangs on transferring data from ...
Permissions in this forum:
You cannot reply to topics in this forum