Search
 
 

Display results as :
 


Rechercher Advanced Search

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

WebDriverException Was Unhandled

View previous topic View next topic Go down

WebDriverException Was Unhandled

Post by ccox on Wed May 08, 2013 4:57 am

I am getting an ElementNotVisibleException when trying to click on an element. After doing some research I found I can use the JavaScriptExecutor to run the js behind the button. Clicking on this button pops up a window. When I run the js command, the script pops up the window, then waits for ~20 seconds and fails. There error states a WebDriverException was unhandled and there was No response from server for url http://localhost.

I get this error only when using js to either click on the button or when I call the command to open the new window. First, has anyone encountered anything like this? If so, how did you handle it? Second, Does anyone have any suggestions for handling an ElementNotVisibleException if the normal Click() function, the JavaScriptExecutor and the Actions class do not work for this element?


ccox
Master
Master

Posts : 205
Join date : 2012-01-06
Age : 31
Location : Denver, CO

Back to top Go down

Re: WebDriverException Was Unhandled

Post by tarun3kumar on Thu May 09, 2013 5:29 pm

I would suggest to either add a safeClick method or use existing synchronization methods available in java -

http://docs.seleniumhq.org/docs/04_webdriver_advanced.jsp

You could try visibilityOf(WebElement element) method with ExpectedConditions

http://selenium.googlecode.com/svn/trunk/docs/api/java/org/openqa/selenium/support/ui/ExpectedConditions.html#visibilityOf(org.openqa.selenium.WebElement)

Hope this helps

_________________
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: WebDriverException Was Unhandled

Post by ccox on Fri May 17, 2013 2:13 am

Hey Tarun,

All of this is in C#. I'm exhausting my options at this point. The button is showing as Displayed= False to the driver and is unable to click on it because of this. So I used the JSExecutor to call the onclick function behind the button. That is when I get this. For some reason the execution of this function ends up timing out the IEDriverServer. The button will pop up another window and I believe when this happens the js execution is continuing to run for some reason, even though its action has already been completed. From my discussions with the developers, these pop up windows are specific to IE. Do you know of any way to tell why this execution is continuing, or have any ideas on how to end the execution when the button is clicked?

ccox
Master
Master

Posts : 205
Join date : 2012-01-06
Age : 31
Location : Denver, CO

Back to top Go down

Re: WebDriverException Was Unhandled

Post by tarun3kumar on Mon May 20, 2013 3:52 pm

Hi ccox,

I had a look and found that ExpectedConditiond class is available in C#as well -

http://selenium.googlecode.com/git/docs/api/dotnet/html/AllMembers_T_OpenQA_Selenium_Support_UI_ExpectedConditions.htm

This page has one example -

http://selenium.googlecode.com/git/docs/api/dotnet/html/T_OpenQA_Selenium_Support_UI_ExpectedConditions.htm

Hope this helps

_________________
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: WebDriverException Was Unhandled

Post by ccox on Tue May 21, 2013 4:26 am

The problem is this element is never displayed per se. I can see it and click on it manually but the attributes the driver picks up show it not as being displayed.


Is there a way to use the JSExecutor to override and add a CSS attribute to manipulate this button's display attribute? I know using js isn't the best approach, but I think that's the only option I have left, besides having the page rewritten

ccox
Master
Master

Posts : 205
Join date : 2012-01-06
Age : 31
Location : Denver, CO

Back to top Go down

Re: WebDriverException Was Unhandled

Post by tarun3kumar on Tue May 21, 2013 10:26 am

This is little mysterious, is there a way for me to access you application?
You could email me privately at "tkumarb @ gmail.com"

Though I don't use C# but I suppose same test should fail in java also.

_________________
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: WebDriverException Was Unhandled

Post by Sponsored content Today at 3:11 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