Answer the question
In order to leave comments, you need to log in
Protractor angular js (testing). How to select a certain element from the list (option value=) and click it?
Good afternoon.
Help with the following, there are two panels on the page with different IDs, respectively, but their values are the same (the number of elements (there are four in both panels) in the list and their name), so I can’t select the desired parameter and click it.
My protractor code:
it('sort AZ', function(){
browser.sleep(1000);
var allOptions = element(by.id('navbarBody')).element.all(by.model('sortSelected '));
expect(allOptions.count()).toEqual(4);
var aZ = allOptions.get(0);
aZ.click();
browser.sleep(4000);
expect(aZ.getText()). toEqual('AZ TITLE');
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question