Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How do you handle js alerts?

If the alert on the browser comes from JavaScript, we use to
handle them Alert class.
Alert alert = driver.switchTo.alert();
alert.accept();
alert.dismiss();
alert.sendKeys();
alert.getText();
Source by learn.codeinstitute.net #
 
PREVIOUS NEXT
Tagged: #How #handle #js
ADD COMMENT
Topic
Name
1+7 =