lundi 1 juin 2015

Protractor (noob) get value of drop down select

I'm trying to get the value of a selected dropdown.

I found an question on SO on how to select the value I want, I found several that claim to say how to get the text of the selected value for Expects testing, but i can't get their answers to work. It's very probably because of my extensive 3 hours of Protractor experience.

can you assist?

element(by.css('[value="' + 1 + '"]')).click();

expect(element(by.name('selectedCallscript')).$('option:checked').getText()).ToEqual('Action Verification');

I'm using the latest Protractor, because I downloaded it a few hours ago.

I get an undefined on the .ToEqual, I've also tried .equals and .contains.

Aucun commentaire:

Enregistrer un commentaire