Skip to content

Commit

Permalink
Fix selects option in select field
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaimaaNatshah committed Mar 28, 2024
1 parent ca05853 commit 79e67ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/step-definitions/webship.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@ When(/^(I|we)* fill in the following:$/, function (pronoundCase, table) {
*/
When(/^(I|we)* select "([^"]*)?" from "([^"]*)?"$/, function (pronoundCase, option, dropdownlist) {

return browser.click('select' + dropdownlist + ' option[value=' + option + ']');
browser.element('css selector', "select[name=" + dropdownlist + "]", function (result) {
if (result.status === 0) {
return browser.click(dropdownlist + ' option[value=' + option + ']');
}
});
});

/**
Expand Down

0 comments on commit 79e67ff

Please sign in to comment.