Skip to content

Commit

Permalink
style: 🚨 Formating
Browse files Browse the repository at this point in the history
  • Loading branch information
MickaelFontes committed Oct 30, 2024
1 parent 6178bf6 commit 0f6afa3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
16 changes: 7 additions & 9 deletions __tests__/chromedriver.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import { Builder, Capabilities, until, By, Key } from 'selenium-webdriver';
import { Builder, Capabilities, until, By, Key } from "selenium-webdriver";
(async () => {
const timeout = 30000;
const driver = new Builder()
.withCapabilities(Capabilities.chrome())
.build();
const driver = new Builder().withCapabilities(Capabilities.chrome()).build();
try {
await driver.get('https://google.com');
await driver.wait(until.titleContains('Google'), timeout);
await driver.get("https://google.com");
await driver.wait(until.titleContains("Google"), timeout);
console.log(await driver.getTitle());

const searchBox = await driver.findElement(By.name('q'));
await searchBox.sendKeys('ChromeDriver', Key.RETURN);
await driver.wait(until.titleContains('ChromeDriver'), timeout);
const searchBox = await driver.findElement(By.name("q"));
await searchBox.sendKeys("ChromeDriver", Key.RETURN);
await driver.wait(until.titleContains("ChromeDriver"), timeout);
console.log(await driver.getTitle());
} finally {
driver.quit();
Expand Down
4 changes: 2 additions & 2 deletions src/setup-chromedriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ async function run() {
if (arch == "win32") {
await exec.exec(
"powershell -File " +
path.join(__dirname, "../lib", "setup-chromedriver.ps1 " + version)
path.join(__dirname, "../lib", "setup-chromedriver.ps1 " + version),
);
} else {
await exec.exec(path.join(__dirname, "../lib", "setup-chromedriver.sh"), [
version,
arch,
chromeapp
chromeapp,
]);
}
} catch (error: unknown) {
Expand Down

0 comments on commit 0f6afa3

Please sign in to comment.