-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Chrome for Testing #175
Comments
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' |
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); |
Since I don't have much time available, we are waiting for pull requests from those who can handle the task🙇♂️🙏 |
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 |
We have released a version that supports Chrome for Testing. |
https://github.com/GoogleChromeLabs/chrome-for-testing
The text was updated successfully, but these errors were encountered: