-
Notifications
You must be signed in to change notification settings - Fork 0
07 Locators
Biswajit Sundara edited this page Feb 23, 2021
·
2 revisions
Protractor supports all the locators supported by selenium
const { element } = require("protractor");
describe('Protractor Locator Demo', function() {
it('should have a title', function() {
browser.get('http://juliemr.github.io/protractor-demo/');
expect(browser.getTitle()).toEqual('Super Calculator');
element(by.model('first')).sendKeys('5');
element(by.model('second')).sendKeys('3');
element(by.id('gobutton')).click();
element(by.css("h2[class='ng-binding'")).getText().then((result)=>{
console.log(result);
})
});
});