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

[IEDriver] Ignore process id match when finding the window handle - IE Mode on Edge. #12246

Merged
merged 2 commits into from
Jun 23, 2023

Conversation

diemol
Copy link
Member

@diemol diemol commented Jun 23, 2023

This assumes a single Edge instance is running
on the host. Not suited for running sessions
in parallel, or having another Edge browser
manually at the same time, because it will
most likely lead to return the wrong window
handle.

Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.

#12091 describes the issue where running IEDriver combined with IE Mode on Edge under an admin window does not work. This happens because under these conditions Edge is launched in a forked process without privileges, and then the process id IEDriver gets is different from the one it actually uses.

This PR introduces a flag (ie.ignoreprocessmatch) which avoids the process id matching, and IEDriver can use the launched Edge browser.

Description

All the previous assumes a single Edge instance is running on the host. This is not suited for running sessions in parallel, or having another Edge browser opened manually at the same time, because it will most likely lead to return the wrong window handle.

{
  "capabilities": {
		"alwaysMatch": {
			"browserName": "internet explorer",
			"se:ieOptions": {
				"ie.edgechromium": true,
				"ie.ignoreprocessmatch": true
			}
		},
    "firstMatch": [{}]
  }
}

Motivation and Context

Allows users to run IEDriver with IE Mode under admin shells with the caveats described above.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

…E Mode on Edge.

This assumes a single Edge instance is running
on the host. Not suited for running sessions
in parallel, or having another Edge browser
manually at the same time, because it will
most likely lead to return the wrong window
handle.
@diemol diemol linked an issue Jun 23, 2023 that may be closed by this pull request
@diemol diemol merged commit 6e85abb into trunk Jun 23, 2023
@diemol diemol deleted the ie-mode-admin-shell branch June 23, 2023 19:20
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.

[🐛 Bug]: IE Mode won't work if IEDriverServer is launched as admin
1 participant