When I try to work with dropdown or calendar,
get partySizeField() {
return $("#sn-reservationSelectorPartySize");
}
async partySizeValues() {
await this.partySizeField.click();
}
I get an error
Error: Can't call click on element with selector "#sn-reservationSelectorPartySize" because element wasn't found
What is the right way to call dropdown in a modal window?
2
Answers
The element you are after, it is inside and
iframe
.In order to access the element, you need to switch toiframe
first.The Modal Window elements are within an iframe so you have to switch to the
<iframe>
first as follows:tl; dr
Switching To Frames in WebDriverIO