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

feat: add webdriver options for windows #8609

Merged

Conversation

thewh1teagle
Copy link
Contributor

Add option to pass webviewOptions into tauri web driver,
As per capabilities-edge-options#webviewoptions-object

When testing with webdriver, I needed to use the default data directory of my app for authentication,
and the only way to pass it with webview2 is using webviewOptions.

Usage example:

const capabilities = new Capabilities();
capabilities.set("tauri:options", {
    application,
    args: [], // passed to EdgeOptions
    webview_options: {
	    additionalBrowserArguments: ["--user-data-dir=C:\Users\User\AppData\Local\AppName\EBWebView"],
    },
});
capabilities.setBrowserName("wry");

// start the webdriver client
driver = await new Builder()
  .withCapabilities(capabilities)
  .usingServer("http://127.0.0.1:4444/")
  .build();

@thewh1teagle thewh1teagle requested a review from a team as a code owner January 15, 2024 22:46
@amrbashir amrbashir requested a review from chippers January 16, 2024 00:24
@thewh1teagle
Copy link
Contributor Author

thewh1teagle commented Jan 16, 2024

Related issue discovered #8610

Copy link
Member

@lucasfernog lucasfernog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, thanks!

@lucasfernog
Copy link
Member

Next time please set up commit signing :) would be really cool!

@lucasfernog lucasfernog merged commit 435d751 into tauri-apps:dev Jan 31, 2024
5 checks passed
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.

2 participants