Skip to content
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

chore: Upgrade Selenium to 4.11.0 #1656

Merged
merged 1 commit into from
Aug 2, 2023
Merged

chore: Upgrade Selenium to 4.11.0 #1656

merged 1 commit into from
Aug 2, 2023

Conversation

alvarezguille
Copy link
Member

No description provided.

@knoobie
Copy link

knoobie commented Aug 15, 2023

Was it intended that this is a 9.0.x release? I had to downgrade Vaadin from 24.1.5 to 24.1.4 again because the new selenium broke all our tests.

Example stack trace:

org.openqa.selenium.remote.NoSuchDriverException: 
Unable to obtain: Capabilities {browserName: chrome, goog:chromeOptions: {args: [headless, window-size=1920,1080], extensions: []}}, error Command failed with code: 134, executed: [/tmp/selenium-manager21544606043145063418302961163649818/selenium-manager, --browser, chrome, --output, json]
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }', src/files.rs:65:34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

	at org.openqa.selenium.remote.service.DriverFinder.getPath(DriverFinder.java:25)
	at org.openqa.selenium.remote.service.DriverFinder.getPath(DriverFinder.java:13)
	at org.openqa.selenium.chrome.ChromeDriver.generateExecutor(ChromeDriver.java:99)
	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:88)
	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:83)
	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:72)
	at de.dvzmv.base.vaadin.toolkit.tests.integration.AbstractJUnit5ViewTest.createDriver(AbstractJUnit5ViewTest.java:36)
	at com.vaadin.testbench.browser.BrowserExtension.beforeEach(BrowserExtension.java:193)
Caused by: org.openqa.selenium.WebDriverException: Command failed with code: 134, executed: [/tmp/selenium-manager21544606043145063418302961163649818/selenium-manager, --browser, chrome, --output, json]
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }', src/files.rs:65:34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

	at org.openqa.selenium.manager.SeleniumManager.runCommand(SeleniumManager.java:151)
	at org.openqa.selenium.manager.SeleniumManager.getDriverPath(SeleniumManager.java:273)
	at org.openqa.selenium.remote.service.DriverFinder.getPath(DriverFinder.java:22)
	... 7 more
Caused by: org.openqa.selenium.json.JsonException: Unable to parse: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }', src/files.rs:65:34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

	at org.openqa.selenium.json.Json.toType(Json.java:62)
	at org.openqa.selenium.json.Json.toType(Json.java:55)
	at org.openqa.selenium.manager.SeleniumManager.runCommand(SeleniumManager.java:131)
	... 9 more
Caused by: org.openqa.selenium.json.JsonException: Expected to read a START_MAP but instead have: BOOLEAN. Last 0 characters read: 
Build info: version: '4.11.0', revision: '040bc5406b'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-1160.92.1.el7.x86_64', java.version: '17.0.7'
Driver info: driver.version: ChromeDriver
	at org.openqa.selenium.json.JsonInput.expect(JsonInput.java:315)
	at org.openqa.selenium.json.JsonInput.beginObject(JsonInput.java:238)
	at org.openqa.selenium.json.InstanceCoercer.lambda$apply$0(InstanceCoercer.java:76)
	at org.openqa.selenium.json.JsonTypeCoercer.lambda$buildCoercer$6(JsonTypeCoercer.java:163)
	at org.openqa.selenium.json.JsonTypeCoercer.coerce(JsonTypeCoercer.java:145)
	at org.openqa.selenium.json.Json.toType(Json.java:76)
	at org.openqa.selenium.json.Json.toType(Json.java:60)
	... 11 more


@knoobie
Copy link

knoobie commented Aug 15, 2023

For anybody running into the same problem:

After adding a ChromeDriverService the build works again. Looks like the "new" Selenium Manager is not as good as the old implementation... Now I also had to do the following:

    ChromeDriverService service = new ChromeDriverService.Builder()
      .usingDriverExecutable(new File("/usr/bin/chromedriver"))
      .build();

    // ChromeOptions options; as before

    return new ChromeDriver(service, options);

@Artur-
Copy link
Member

Artur- commented Aug 15, 2023

Unfortunately it is not really an option to stay on an old Selenium version as it will stop working with new Chrome versions, sooner or later. The issue you mention sounds a bit like SeleniumHQ/selenium#12483

@knoobie
Copy link

knoobie commented Aug 15, 2023

Yeah I came across this issue as well and digged into their docs to find how I can remove the Selenium Manager.. our environment is offline, therefore I have to manually add the driver and can't rely on an service to download it at runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants