Skip to content

Commit

Permalink
Fix selectElement example test.
Browse files Browse the repository at this point in the history
  • Loading branch information
garg3133 committed Jul 7, 2024
1 parent b64d103 commit 6d9ea21
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 6d9ea21

Please sign in to comment.