Hi,
Any one can help me, how to handle browser alerts.
I have used, ‘WebUI.acceptAlert()’ and
driver.switchTo().alert().accept().
But it is not working. Please check the attached screenshot for alert reference.
Thankyou,
Sree.
Hi,
Any one can help me, how to handle browser alerts.
I have used, ‘WebUI.acceptAlert()’ and
driver.switchTo().alert().accept().
But it is not working. Please check the attached screenshot for alert reference.
Thankyou,
Sree.
Have you tried this :
WebUI.openBrowser('C:\\\\Users\\\\User\\\\Desktop\\\\How to Handle Alerts.html')
'Maximize the window of the browser'
WebUI.maximizeWindow()
'Clicking on button'
WebUI.click(findTestObject('Alerts/button_ClickHere'))
'Accepting the Alert'
WebUI.acceptAlert()
1.) I have not understood this, here in open browser which path I should need to give.
2.) ‘Clicking on button’
WebUI.click(findTestObject(‘Alerts/button_ClickHere’))
How should I give the xpath for clicking on object, since I don’t have any xpath for alert.
i have same stuck in this alert
Complete demo on alerts explained below
Do you already solve this? I have the same issue
Use below and replacing correct object repository in to repository .
WebUI.waitForElementVisible(findTestObject(‘Object Repository/’), 5, FailureHandling.OPTIONAL)
WebUI.click(findTestObject(‘Object Repository/’), FailureHandling.OPTIONAL)
How can you target the alert via object repository? I cannot capture it via web spy or recording. Alert is the main concern here.
Okay Let us see.
This is not an alert from your application. this is a Permission request from the Chrome Browser.
you have to use Chrome options to handle this one
i hope the following topics help you