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

Create WebDriver with different ChromeOption by test #2675

Closed
vayaszsolt opened this issue Jan 26, 2022 · 4 comments
Closed

Create WebDriver with different ChromeOption by test #2675

vayaszsolt opened this issue Jan 26, 2022 · 4 comments

Comments

@vayaszsolt
Copy link

I am using the serenity to manage the WebDriver download and creation. Right now I am using the chrome driver.

I need to extend a test in order to open the browser with different IP addresses because the application has different behavior by ip address's country.

I need to specify the '--proxy-server' ChromeOption before the WebDriver is created. This value will be different by test. Is there a before web driver hook in Serenity? So I can specify in a programmatic way the ChromeOption before the driver is created.

@globalworming
Copy link
Collaborator

@vayaszsolt
Copy link
Author

vayaszsolt commented Jan 26, 2022

@globalworming Yes this can be a solution but I don't know if the custom web driver will be created after the Before test hook is executed, in order to tell to the CustomWebDriver implementation which proxy-server to use... I will test it out.

Also I have an additional concern: Will I lose some serenity configuration related to the WebDriver creation if I will use a Custom one that will create the ChromeDriver?
I mean the following serenity configuration:

  • Chrome driver to be downloaded, automatically by Serenity? Is it used the webdriver.autodownload property in case of custom driver?
  • The ChromeDriver configuration can be specified in a mixed mode: serenitry.conf and programmatically?

@wakaleo
Copy link
Member

wakaleo commented Jan 28, 2022

If you create a custom driver you are entirely responsible for its configuration.

@wakaleo
Copy link
Member

wakaleo commented Feb 18, 2022

Closing presumed answered.

@wakaleo wakaleo closed this as completed Feb 18, 2022
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

No branches or pull requests

3 participants