Skip to content

Add back WebDriver support - #2324

Merged
lucasfernog merged 5 commits into
devfrom
webdriver
Aug 2, 2021
Merged

Add back WebDriver support#2324
lucasfernog merged 5 commits into
devfrom
webdriver

Conversation

@chippers

Copy link
Copy Markdown
Member

This reverts commit b4426ed.

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Docs
  • New Binding Issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes. Issue #___
  • No

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:
Hopefully this time with less multi-window bugs.

I'm marking this as a draft for right now because we currently use TAURI_AUTOMATION=true environmental variable to detect if we should enable automation on linux. I was thinking that some people might set that true in their shell or profile on their development machine, and may unknowning affect their other Tauri projects. Should we expose some sort of config setting to allow them to set their own env var name to watch? Maybe something on the config like:

{
  /* ... snip ... */
  "webdriver": {
    "flag": {
      "name": "MY_APP_AUTOMATION",
      "value": "true",
    }
  }
  /* ... snip ... */
}

and maybe we default value the name of the application from cargo env + _AUTOMATION with true as the value. Thoughts?

@chippers

Copy link
Copy Markdown
Member Author

during conversation of the env flag, I saw a way to perhaps be able to disable it completely on webview2 which would bring it up to feature parity of webkit2gtk. If that works, then I will flesh out the api in Wry to be able to disable it and then expose it somewhere for Tauri to be able to set it or not. This would allow developers to completely disable it at compile time, and only enable it when building for automation specifically

@chippers

Copy link
Copy Markdown
Member Author

during conversation of the env flag, I saw a way to perhaps be able to disable it completely on webview2 which would bring it up to feature parity of webkit2gtk. If that works, then I will flesh out the api in Wry to be able to disable it and then expose it somewhere for Tauri to be able to set it or not. This would allow developers to completely disable it at compile time, and only enable it when building for automation specifically

Looks like the blink renderer flag only disables setting the window.webdriver to true and not disable the WebDriver completely.

@chippers

chippers commented Jul 30, 2021

Copy link
Copy Markdown
Member Author

I think that the TAURI_AUTOMATION=true env var is probably fine as is. If it becomes a problem in the future, we can offer some way to set it. We can also not consider TAURI_AUTOMATION=true part of the stable Tauri interface so that we are free to change it in the future until we settle on a stable interface.

I'm going to un-draft this, although I suggest reviewers to run the examples a number of times each on their platform - especially the multiwindow example. I myself will be testing it on various Linux and Window variations today

@chippers chippers self-assigned this Jul 30, 2021
@chippers
chippers marked this pull request as ready for review July 30, 2021 17:22
@chippers
chippers requested a review from a team as a code owner July 30, 2021 17:22
@chippers
chippers requested a review from a team July 30, 2021 17:22
@lucasfernog
lucasfernog merged commit 4b2aa35 into dev Aug 2, 2021
@lucasfernog
lucasfernog deleted the webdriver branch August 2, 2021 02:54
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