Search
 
 

Display results as :
 


Rechercher Advanced Search

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Execution hangs after clicking on Element

View previous topic View next topic Go down

Execution hangs after clicking on Element

Post by abigna on 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.

abigna

Posts : 5
Join date : 2012-11-02

Back to top Go down

Re: Execution hangs after clicking on Element

Post by tarun3kumar on 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.

_________________
Thanks
Tarun K
Free Selenium Training

tarun3kumar
Master
Master

Posts : 186
Join date : 2012-02-14

http://seleniumtests.com

Back to top Go down

Re: Execution hangs after clicking on Element

Post by abigna on 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

abigna

Posts : 5
Join date : 2012-11-02

Back to top Go down

Re: Execution hangs after clicking on Element

Post by abigna on 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

abigna

Posts : 5
Join date : 2012-11-02

Back to top Go down

I think as per your code U forgot to add double quote " at the end

Post by ravinderreddy on 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')");

ravinderreddy

Posts : 6
Join date : 2012-11-10
Age : 29
Location : Hyderabad/Mumbai

Back to top Go down

Re: Execution hangs after clicking on Element

Post by Sponsored content Today at 3:07 pm


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum