WebDriverException and UnhandledAlertException while executing the Script
Hai All,
I am unable to find solution for the following issues .These issues are causing the failures for remaining cases as the browser is not responding or may be stopped.
Please can anyone sort out this issue.
1——>
org.openqa.selenium.WebDriverException: [JavaScript Error: “e is null” {file: “file:///C:/Users/SVC-DE~1/AppData/Local/Temp/anonymous3082402930519245195webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js” line: 7854}]'[JavaScript Error: “e is null” {file: “file:///C:/Users/SVC-DE~1/AppData/Local/Temp/anonymous3082402930519245195webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js” line: 7854}]’ when calling method: [nsICommandProcessor::execute]
Command duration or timeout: 372.33 seconds
2——>
org.openqa.selenium.UnhandledAlertException: Modal dialog present: A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue.
Script: https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js:5
Build info: version: ‘2.44.0’, revision: ’76d78cf323ce037c5f92db6c1bba601c2ac43ad8′, time: ‘2014-10-23 13:11:40’
3——->
org.openqa.selenium.WebDriverException: [JavaScript Error: “a.document.getElementsByTagName(…)[0].getButton is not a function” {file: “file:///C:/Users/SVC-DE~1/AppData/Local/Temp/anonymous7123599558312300991webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js” line: 8900}]'[JavaScript Error: “a.document.getElementsByTagName(…)[0].getButton is not a function” {file: “file:///C:/Users/SVC-DE~1/AppData/Local/Temp/anonymous7123599558312300991webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js” line: 8900}]’ when calling method: [nsICommandProcessor::execute]
Command duration or timeout: 353.12 seconds
Build info: version: ‘2.44.0’, revision: ’76d78cf323ce037c5f92db6c1bba601c2ac43ad8′, time: ‘2014-10-23 13:11:40’
Actually my script run for every two hours on server.So I couldn’t able to find what exactly the issue.and even I couldn’t able debug this as the errorĀ is not frequent. I am getting these exceptions daily once or twice.
Please help me.
Hi Ravinder,
Try this ..
– Add implicitly wait
driver.manage().timeouts().implicitly(15, TimeUnit.SECONDS)
If you already added implicitly wait means, check the elements id it might be dynamically changing every time.
– And for UnhandledAlertException
DesiredCapabilites capabilites = new DesiredCapabilites();
capabilites.setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR,UnexpectedAlertBehaviour.ACCEPT);
driver = new FirefoxDriver(capabilites);
Thank you @yashraj.
I will try and let you know.