Git Product home page Git Product logo

Comments (5)

nanasess avatar nanasess commented on May 27, 2024 3

We have released a version that supports Chrome for Testing.
https://github.com/nanasess/setup-chromedriver/releases/tag/v2.1.0

from setup-chromedriver.

mvdbeek avatar mvdbeek commented on May 27, 2024 1

Would you be open for a simple solution as outlined in https://developer.chrome.com/blog/chrome-for-testing/#how-can-i-get-chrome-for-testing-binaries ?

It could be as simple as npx @puppeteer/browsers install chrome@stable and npx @puppeteer/browsers install chromedriver@stable ?

from setup-chromedriver.

nanasess avatar nanasess commented on May 27, 2024

Download URLs can be obtained as follows

curl https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json | jq '.versions[] | select(.version == "116.0.5828.0") | .downloads.chrome[] | select(.platform == "linux64") | .url'
curl https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json | jq '.versions[] | select(.version == "116.0.5828.0") | .downloads.chromedriver[] | select(.platform == "linux64") | .url'

from setup-chromedriver.

nanasess avatar nanasess commented on May 27, 2024

Patch specifying chrome and chromedriver paths.

diff --git a/__tests__/chromedriver.ts b/__tests__/chromedriver.ts
index 4835d5fc..0764e5fd 100644
--- a/__tests__/chromedriver.ts
+++ b/__tests__/chromedriver.ts
@@ -1,14 +1,20 @@
 import { Builder, Capabilities, until, By, Key } from 'selenium-webdriver';
+import { Options, ServiceBuilder } from 'selenium-webdriver/chrome';
 (async () => {
   const timeout = 30000;
+  const options = new Options()
+    .setChromeBinaryPath('/path/to/chrome-linux64/chrome');
+  const serviceBuilder = new ServiceBuilder('/path/to/chromedriver-linux64/chromedriver');
   const driver = new Builder()
     .withCapabilities(Capabilities.chrome())
+    .setChromeOptions(options)
+    .setChromeService(serviceBuilder)
     .build();
   try {
     await driver.get('https://google.com');
     await driver.wait(until.titleContains('Google'), timeout);
     console.log(await driver.getTitle());
-
+    await driver.sleep(10000);
     const searchBox = await driver.findElement(By.name('q'));
     await searchBox.sendKeys('ChromeDriver', Key.RETURN);
     await driver.wait(until.titleContains('ChromeDriver'), timeout);

from setup-chromedriver.

nanasess avatar nanasess commented on May 27, 2024

Since I don't have much time available, we are waiting for pull requests from those who can handle the taskπŸ™‡β€β™‚οΈπŸ™

from setup-chromedriver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.