Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/husky-9.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
nanasess authored Dec 2, 2024
2 parents 92f85e6 + 16b8067 commit 3fb5d73
Show file tree
Hide file tree
Showing 14 changed files with 24,765 additions and 1,361 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,12 @@ jobs:
if: matrix.branch == 'now'
with:
chromedriver-version: ${{ env.CHROMEDRIVER_VERSION }}
chromeapp: ${{ env.CHROMEAPP }}
- uses: nanasess/setup-chromedriver@master
if: matrix.branch == 'master'
with:
chromedriver-version: ${{ env.CHROMEDRIVER_VERSION }}
chromeapp: ${{ env.CHROMEAPP }}
- name: setup
run: |
export DISPLAY=:99
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ jobs:
if: matrix.branch == 'now'
with:
chromedriver-version: ${{ env.CHROMEDRIVER_VERSION }}
chromeapp: ${{ env.CHROMEAPP }}
- uses: nanasess/setup-chromedriver@master
if: matrix.branch == 'master'
with:
chromedriver-version: ${{ env.CHROMEDRIVER_VERSION }}
chromeapp: ${{ env.CHROMEAPP }}
- name: setup
run: |
chromedriver --url-base=/wd/hub &
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ steps:
with:
# Optional: do not specify to match Chrome's version
chromedriver-version: '88.0.4324.96'
# Optional: if your chrome binary name is different
chromeapp: chrome
- run: |
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
Expand Down
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
16 changes: 9 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: 'setup-chromedriver'
description: 'Setup chromedriver'
author: 'nanasess'
name: "setup-chromedriver"
description: "Setup chromedriver"
author: "nanasess"
inputs:
chromedriver-version:
description: 'The chromedriver version to install'
description: "The chromedriver version to install"
required: false
chromeapp:
description: "Custom chrome binary name (for Linux or MacOS)"
required: false
runs:
using: 'node20'
main: 'dist/index.js'

using: "node20"
main: "dist/index.js"
Loading

0 comments on commit 3fb5d73

Please sign in to comment.