RE: 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.

org.openqa.selenium.WebDriverException: [JavaScript Error: “e is null” {file: “file:///C:/Users/SVC-DE~1/AppData/Local/Temp/anonymous3082402930519245195webdriver-profile/extensions/” line: 7854}]'[JavaScript Error: “e is null” {file: “file:///C:/Users/SVC-DE~1/AppData/Local/Temp/anonymous3082402930519245195webdriver-profile/extensions/” line: 7854}]’ when calling method: [nsICommandProcessor::execute]
Command duration or timeout: 372.33 seconds

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.

Build info: version: ‘2.44.0’, revision: ’76d78cf323ce037c5f92db6c1bba601c2ac43ad8′, time: ‘2014-10-23 13:11:40’

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/” 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/” 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.

Add Comment
1 Answers
Best answer

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();
driver = new FirefoxDriver(capabilites);

Train Answered on March 18, 2015.

Thank you @yashraj.
I will try and let you know.

on March 18, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.