RE: Please help me how to Overcome the below failure

Hi Everyone,

Please give me the solution to overcome the below failure on IE11.

Modal dialog present: Invalid value entered into the brokers commission percent. Build info: version: ‘2.41.0’, revision: ‘3192d8a’, time: ‘2014-03-27 17:18:15’ System info: host: ‘INBEDW011027B’, ip: ‘’, ‘Windows 8’, os.arch: ‘amd64’, os.version: ‘6.2’, java.version: ‘1.7.0_15’ Session ID: 34700e06-ac79-4fd5-b019-8fcc2e29029a Driver info: Capabilities [{platform=WINDOWS, javascriptEnabled=true, elementScrollBehavior=0, ignoreZoomSetting=false, enablePersistentHover=true, ie.ensureCleanSession=false, browserName=internet explorer, enableElementCacheCleanup=true, unexpectedAlertBehaviour=dismiss, version=11, ie.usePerProcessProxy=false, cssSelectorsEnabled=true, ignoreProtectedModeSettings=false, requireWindowFocus=false, handlesAlerts=true, initialBrowserUrl=http://localhost:2103/, ie.forceCreateProcessApi=false, nativeEvents=true, browserAttachTimeout=0, ie.browserCommandLineSwitches=, takesScreenshot=true}]

kishanmvs Default Asked on August 13, 2014 in Selenium WebDriver.
Add Comment
3 Answers

Hi Krishan,

If it is really a Modal Window, then you do not need to be use the switch command. Just get the id or xpath of it and do your operations on it. Modal window is always a part of same html page. Make sure you use the thread.sleep() before clicking any element on Modal window, as it is generated with the java script and sometime it takes one or more seconds to appear on the page but Selenium did not understand this delay, as it is a same page and it tries to perform action with in fractions of second and it got failed.
Example of modal window, most of the time it covers the background with transparent black wallpaper and on top it the window display.

If it is not Modal window and if it is a pop up alert try below code, this may help you.

// Get a handle to the open alert, prompt or confirmation

Alert alert = driver.switchTo().alert();
//Will Click on OK button.

// Will click on Cancel button.


Lakshay Sharma

Professor Answered on November 4, 2014.
Add Comment

Your Answer

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