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

Popular posts from this blog

Implicit and Explicit Waits,FluentWait,PageLoadTimeOut

A Interview Questions- selenium