Unable to switch to Alert without closing window popup in webdriver -
scenario:
- enter keyword (position) in textbox
- press tab or click on next element
- a window popup appears
- a list of position matching criteria listed
- click required record
- popup window closes automatically
- alert displayed
- have click on ok button of alert.
- switch main window , check position details
question :- found many solutions in site performing actions on window popup , close popup switch alert or main browser
but application closes popup window automatically after selection,hence cannot use driver.close() or driver.switchto.defaultcontent().
if dont close driver (for popup) im not able identify next alert displayed after popup.
if switch directly mainwindhandle, alert dismiss happening instead of accept.
please know how switch window popup alert without popup close needed...
thanks ....
if alert dismiss happening when trying accept it, why don't use alert.dismiss(), accept alert in context.
when switch popup window, driver focus on popup window. might want is, after clicking required record, switch main window accept alert.
Comments
Post a Comment