-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] fix Edge IE mode issue that sometimes cannot get the handle of a newly opened window #10702
Conversation
… to appear. A part of the fixes for issues that occur in Edge IE mode. There is a thread that uses SendMessage to send WM_USER in the mouse click process, and this thread goes into a wait state. If this is not done, the new browser window will never be displayed. Therefore, you need to process the WM_USER message while waiting for a new window to appear.
…hing to the window. A part of the fixes for issues that occur in Edge IE mode. When a new browser window appears and closes immediately, IEDriver may try to attach to a window that doesn't exist. To solve this problem, check that the window process exists before attaching to the window.
…d window. A part of the fixes for issues that occur in Edge IE mode. If the grandchild window opens before it is attached to the child window, IEDriver cannot detect the appearance of the grandchild window. Therefore, if a child window and a grandchild window appear at the same time, the handle of the grandchild window cannot be obtained. To solve this problem, add wait to wait for the grandchild window to appear, and attach to all elements of diff list.
I'm facing the same issue. I tried with IE driver v4.0 & v4.2. MS Edge is getting launched in IE Mode, window handle works when only one Window present. But if multiple window gets open, then the code get stuck at driver.window_handles line. Could you please provide the ASAP.. |
Any updates on this? A merge would be very helpful, we have lots of issues with this. |
When I built and tested IEDriverServer this change, I found that test.js, test2.js and test3.js are more stable, but test4.js and test5.js are still failing. @yusuke-noda does this match your expectations? Log from test4.js:
Log from test5.js:
|
Hello @bwalderman .
But if "Always open pop-ups in a new tab" option is enabled in IE's tabbed Browsing Settings, test5.js fails same as test6.js |
hey guys any updates on this? looking forward to the changes to be merged... |
The "Always open pop-ups in a new tab" setting isn't visible in my Windows 11 environment anymore, probably because of the IE11 removal. So I can't verify that test5.js and test6.js would be fixed. However, the change looks good to me and the other test cases appear to be stable. I've just left a couple suggestions to rename variables to match the style used in the rest of the code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reviewing, @bwalderman!
Thank you for this PR, @yusuke-noda!
IE Driver 4.3 is released - https://github.com/SeleniumHQ/selenium/releases/tag/selenium-4.3.0 |
With Selenium Java version 4.4.0 or 4.3.0 and IE Driver 4.3.0 I am still getting facing the same issue. Can anyone please help? |
getting the same issue with latest versions of IE driver and selenium java versions.Any one was able to find a solution or workaround? |
@anishamarotkar & @jyosha3 can you comment on MicrosoftEdge/EdgeWebDriver#19 we may need to re-open that. |
@titusfortner Yes did comment on that issue just now.How can it be reopened though.I am new and came here looking for a solution so dont know how things work here. |
Yeah, since IEDriver is *only supported via Edge right now, the code management is being done in collaboration with Microsoft. So the current practice (subject to change) is to file the issue in MicrosoftEdge repo, and then the PRs are done here. @bwalderman is the person who would be able to re-open that issue. Also, you might need to provide more info with a trace log in a reproducible case if it is at all different from what has been previously reported. |
@titusfortner ok .. thanks for the information.. i have provided a test scenario in the microsoft edge repo.. alongwith the exception i gt. @bwalderman do I need to provide any more details for u to reopen / address the issue. |
Hello, are there any changes on this issue? |
Description
Fix Edge IE mode issue that sometimes cannot get the handle of the newly opened window.
Motivation and Context
This is a fix for an issue of Edge IE mode that sometimes cannot get the handle of a newly opened window.
Resolve #8868
Resolve MicrosoftEdge/EdgeWebDriver#19
Reproduction steps
Attached zip file contains test programs to reproduce of the issue.
iedrivertest.zip
npm install
node server.js
node test.js --edge-path "path\to\msedge.exe" --driver-path "path\to\IEDriverServer.exe"
node test2.js --edge-path "path\to\msedge.exe" --driver-path "path\to\IEDriverServer.exe"
node test3.js --edge-path "path\to\msedge.exe" --driver-path "path\to\IEDriverServer.exe"
node test4.js --edge-path "path\to\msedge.exe" --driver-path "path\to\IEDriverServer.exe"
node test5.js --edge-path "path\to\msedge.exe" --driver-path "path\to\IEDriverServer.exe"
Contents of test programs
Open one child window and check that can get window handle of the child window.
Open four child window and check that can get window handles of all of the child windows.
Open four child tabs in the same window that contains the parent tab and check that can get window handles of all of the child tabs.
Open child window and its grandchild window at same time and close child window immediately, then check that can get window handle of grandchild windows.
Open child window and its grandchild window at same time, then check that can get window handle of child and grandchild windows.
Unresolved problem
Open child and its grandchild tabs in the same window that contains the parent tab at same time, IEDriver cannot get window handle of the child tab.
node test6.js --edge-path "path\to\msedge.exe" --driver-path "path\to\IEDriverServer.exe"
Types of changes
Checklist