Skip to content

Commit

Permalink
Fix selectElement example test. (#4233)
Browse files Browse the repository at this point in the history
  • Loading branch information
garg3133 committed Jul 15, 2024
1 parent 38389f4 commit 8526bd3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions examples/tests/selectElement.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
const {Select} = require('selenium-webdriver');

module.exports = {
before(browser) {
browser.url('https://www.selenium.dev/selenium/web/formPage.html');
},

async demoTest(browser) {
const selectElement = browser.element('select[name=selectomatic]');

await browser
.url('https://www.selenium.dev/selenium/web/formPage.html')
.perform(async function() {
const select = new Select(selectElement);
const selectWebElement = await selectElement; // `Select` class expects a WebElement

const select = new Select(selectWebElement);

await select.selectByVisibleText('Four');
})
Expand Down

0 comments on commit 8526bd3

Please sign in to comment.