Created
February 9, 2025 06:26
-
-
Save kuc-arc-f/fcfa1691971244f9d5433cd3cda89e77 to your computer and use it in GitHub Desktop.
selenium-test-example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {By, Builder, Browser} = require('selenium-webdriver'); | |
const assert = require("assert"); | |
(async function firstTest() { | |
let driver; | |
try { | |
driver = await new Builder().forBrowser(Browser.CHROME).build(); | |
await driver.get('http://localhost:5173'); | |
await driver.manage().setTimeouts({implicit: 500}); | |
let textBox = await driver.findElement(By.name('title')); | |
let submitButton = await driver.findElement(By.css('button')); | |
await textBox.sendKeys('test'); | |
} catch (e) { | |
console.log(e) | |
} | |
}()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment