Alerts- Accept() Dismiss()
const { func } = require("assert-plus");
const { element } = require("protractor");
describe('',function(){
it('Non angulat website Alets',function(){
browser.waitForAngularEnabled(false);
browser.get('https://rahulshettyacademy.com/AutomationPractice/');
element(by.id('confirmbtn')).click().then(function(){
browser.sleep('5000');
});
// browser.switchTo().alert().accept()
browser.switchTo().alert().dismiss().then(function(){
browser.sleep('5000');
})
})
})
Comments
Post a Comment