elementToBeSelected() in protractor ?
- elementToBeSelected() will checking that an element (like buttons,checkbox,radio buttons .,.) is selected in given time.
Please check below code script:
First check the web element in DOM
elementToBeSelected() in protractor |
Here we have one default checkbox which is in selected state.
describe('Protractor - waits - elementToBeSelected()', function () {
beforeAll(async function () {
await browser.get("https://keeplearners.blogspot.com/2018/03/Angular-elements.html");
});
it('Code script to use waits - elementToBeSelected() in protractor', async function () {
var EC = protractor.ExpectedConditions;
var checkBox = element(by.css("input[value='Check Box 1']"));
await browser.wait(EC.elementToBeSelected(checkBox, 5000));
await console.log("Verified that element is selected in given time");
});
});
Output:
elementToBeSelected() in protractor
Please comment below to feedback or ask questions.
No comments:
Post a Comment
Please comment below to feedback or ask questions.