-
-
Notifications
You must be signed in to change notification settings - Fork 513
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
4.0.0-beta JavascriptExecutor script is not executed #3231
Comments
The proxiedWebDriver is instantiated the first time you interact with the page, e.g when you open a URL. |
The browser is opened and the desired URL is set:
After this I want to set the "token" session variable in order to skip the login page. This it worked with the previous version. My complete code:
|
Could be a bug. Can you dig into the code and propose a PR? |
I will try. Before doing this I would like to be sure I am Injection the WebDriver in the correct way. The above code I use in a StepDefinition class and the WebDriver is injected:
Do I inject the driver in the correct way inside the CucumberStepDefinition class? |
I above code created a new driver that wasn't created before by Serenity. I remove that WebDriver injection inside the Definition class. I moved to use an internal Serenity class:
This fixed my issue. |
Hi,
I switched to use 4.0.0-beta2 since the 3.2.8 version's WebDriver was too old for the current Chrome version. As I understood the current version use the DriverManager provided from Selenium.
After I switched and I resolved the breaking changes I cannot use the JavascriptExecutor with the new driver.
JavascriptExecutor js = (JavascriptExecutor) driver;
String sentence = "window.sessionStorage.setItem(\"" + name + "\"" + ", \"" + value + "\")";
js.executeScript(sentence);
The reason behind this is the "proxiedWebDriver" is null inside the WebDriverFacade class.
What additional configuration do I need to do in order the "proxiedWebDriver" to be initialized?
The text was updated successfully, but these errors were encountered: