Internet Explorer 11 Browser session becoming corrupt - internet-explorer-11

I'm having an issue with a random set of users running Windows 10 and IE11. When the issue occurs the user are in an IE 11 browser session and will see among other things that selected div sections will scroll text but the textboxes and dropdowns will remain static within that div.
The current fix is to start a new browser session not just a new window. Currently this only occurring in about 15-20 out of 700 users. Pages are running with doc mode Edge and user agent default.
I realize this is a rather sparse explanation but that is what I have so far. Does anyone have a suggestion as to what could be causing the issue or a tool that would allow further investigation into the browser session?

From your description, I assume that this issue is not related with website and issue is with IE browser.
I suggest you to check for latest Windows and IE related updates. If any new updates are available than try to install new updates and again check for the issue.
If no any new updates available than try to reset the Internet Explorer browser to check whether it fix the issue or not.
If issue persist than you can try to unchecked the Internet Explorer option from Turn Windows features on or off and again try to check that option to add the IE again.
Let us know about your testing results. If issue persist than we can try to provide further suggestions.

Related

IE 11 not remembering login from 1st tab to the 2nd tab in same IE Session

I've had an issue for a while, where my IE 11 does not remember the login for a site from 1 tab to the next.
I can login to a site with no issue, but if I click a link & want to open it into a new tab (within the same IE window) the new tab will show that I'm no longer logged into that site.
The same thing applies to when I'm placing an order online & if I open a new tab from that same site, then the items which were in my cart, no longer exist.
NOTE: I wanted to post 2 screenshots I had, but the site won't let me post those, let me know how I can those to someone if want to see them.
I have tried a few things relating to changing settings in IE, one was from this site & the other from Microsoft & a couple of others from other sites.
NOTE - site won't allow me to post more then 1 link, if you need more info, let me know how I can get it to you.
IE11 does not send session cookie when a link targeting a new tab is clicked (on first request)
None of these of these has worked & I haven't seen the question asked specifically the way I've posed it.
Any help is appreciated.
Thanks
I have noticed similar behavior is triggered when X-UA-Compatible changes mode between pages, especially when the session starts with IE=edge and gets switched to IE=7 on a later page. It seems session cookies are lost in the new IE PID started up for the IE 7 compatibility mode page. Does that happen to apply at all to your situation?

Why doesn't pagingTextBox work in IE using dgrid pagination

Does anyone happen to know why the pagingTextBox doesn't work when using the dgrid pagination? It works fine in FireFox and Chrome but when hitting the enter key in the textbox in IE, it does nothing. I'm using IE 10, but also tried with IE 8. I need this functionality in all 3 browsers. Thanks.
The only event that the paging textbox listens for is change. Apparently, pressing enter registers this event on Chrome and Firefox but not IE. I'm not sure what the reasoning is behind that.
This seems like a legitimate issue to report on dgrid's GitHub issues page though. It shouldn't take too much effort to fix, even if it means listening for 2 types of events.

Why I can programmatically access only the first loaded page?

I have very weird issue with some VBA code. The code is InternetExplorer automation and it's really simple: I just need to load page, enter credentials and click on the button on another page (after successful login).
But... My code is not working (but only on one of my machines on AWS). On my local machine this code works fine.
The weird thing is that it seams I have access only to the Document property of the first loaded page (where I need to enter login/password). I mean from MyBrowser.Document property I can see all INPUT fields when I load start page. But after successful login (the IE window is visible) I see same INPUT fields from MyBrowser.Document property! Also (as I said) I have no issues with this code on another maching.
IE Protected mode is disabled (this is IE 11). I think this is some kind of security issue but I can't locate it by myself...
Here is my code:
'MyBrowser is IE instanse
'Here I'm loading start page and input login/password
'Next the browser show me another page where I need to click a button
'But Debug messages show me input fields for the first Form!
Application.Wait (Now + TimeValue("0:00:05"))
Do
DoEvents
Loop Until MyBrowser.ReadyState = READYSTATE_COMPLETE
Set HTMLDoc = MyBrowser.Document
For Each myHTML_Element In HTMLDoc.getElementsByTagName("INPUT")
If myHTML_Element.Type = "submit" And myHTML_Element.Name = "BUTTONNEWJOBS" Then myHTML_Element.Click: Exit For
Debug.Print myHTML_Element.Name
Next
UPDATE
I don't know why but my browser object is always Busy that's why I get old page HTML. I tried to .Stop it but with no luck.
I don't have answer for IE11 automation, just a hint for a path you may choose to walk.
Another Stack Overflow question Getting source of a page after it's rendered in a templating engine? provides some browser automation options.
One of the mentioned tool has currently broken support for IE11 due to a IE11 behavior change, see http://docs.seleniumhq.org/about/platforms.jsp#browsers. The blocking issue has some configuration hints you may find useful.
In my opinion Internet Explorer was ALWAYS the least reliable tool both from the point of view of rendering compatibility, programmability and even the automation problems accross different versions. And although it had improved over the years Internet Explorer is still better to be avoided (from programmer's point of view). Today it is luckily not the only tool available.
So if you just need to get the work done, there are other browsers or browser-like tools that you can use.
If you MUST use IE then you should get your answer at the Internet Explorer Dev Center → Community → Developer forums
EDIT (after comments)
By the symptoms in your question it looks like the browser object is busy because of some dialog box (perhaps a security prompt) is being show to the user. Some links from Google that may help:
required IE configuration from the selenium browser automation engine - https://code.google.com/p/selenium/wiki/InternetExplorerDriver
how to disable Internet Explorer Enhanced Security Configuration - http://4sysops.com/archives/four-ways-to-disable-internet-explorer-enhanced-security-configuration-ie-esc/
Internet Explorer Security Zones and Compatibility View - https://help.blackboard.com/en-us/Learn/9.1_SP_14/Administrator/030_Browser_Support/030_Browser_Support_IE_Issue
set of dialogs that can be manipulated by the iMacros Internet Explorer automation toolkit - http://wiki.imacros.net/Browser_Automation#Dialog_Manager
Rewriting ~1000 lines of code to use another automation interface (or browser) and asking for help at the Microsoft's Internet Explorer Dev Center are IMO still valid options
Based on your following statement
I see same INPUT fields from MyBrowser.Document property!
it would seem that the page hasn't fully loaded. Perhaps it is loading data via AJAX and clicking the submit button shows the exact same page (which would explain why you were seeing the same INPUT fields) while waiting for a response from the server.
An easy way to test this is to wait for a longer period of time (e.g. 30 seconds) and ignoring the value of the browser ReadyState. However a better way would be looping until you find a element on the successful page that isn't on the first page, with a possible timeout of maybe 30 seconds.
I've used Selenium to do some automation and ran into similar problems and had to resort to using Implicit Waits but I'm not sure if VBA as such a feature (as I don't know VBA)

Selenium clicks on a wrong link (or does not click on a link at all) on certain machines

I am using Selenium WebDriver 2.5.0 (tried 2.13.0, it did not help).
I am trying to click on a link like this:
driver.FindElement(By.PartialLinkText("Customer - Creation").Click();
Before it worked, but I have tried to run the scripts after 3 weeks and
I observe 3 different behaviors on 3 machines:
Machine A: There is no click on the link at all, also there is no error.
Machine B: It clicks a different link! Sometimes one above, sometimes one below.
Machine C (Virtual): It works.
I have not fully tested this (spent half a day today), but did anyone stumble upon such a behaviour?
I have restarted my PC, re-added the Selenium libraries.
"SendKeys(Enter)" helps, but this issue happened not only to links, but to at least radio boxes as well, where "SendKeys(Enter)" does not work.
Please share your thoughts.
Update: Browsers are the same on at least 2 machines, Internet Explorer 8.0
Answered by nebehr.g...#gmail.com at Selenium Issues:
This issue keeps popping up from time to time and is usually returned with request for clarifications. The bottom line is, InternetExplorerDriver calculates coordinates of some objects incorrectly and clicks in the wrong place. One reason for this is zoom value other than 100%; however it is reproducible for some controls for 100% zoom as well.
I suppose it would be helpful if you could create a sample page to demonstrate this issue. In the meantime why don't you use Javascript click() method for offending controls?
http://code.google.com/p/selenium/issues/detail?id=3052
One other thing to check for is the screen resolution (not the desktop resolution but the system level size of text and icons). I have two laptops in my office that are you used for testing, one running Windows 7 and the other running Windows 10. On both, the screen resolution was greater than 100% and Selenium was having problems moving the mouse to the correct location for mouse events like click and hover. As soon as the screen resolution was set to 100%, all mouse actions worked correctly.
Windows 7: http://windows.microsoft.com/en-us/windows7/make-the-text-on-your-screen-larger-or-smaller?v=t
Windows 10: https://superuser.com/questions/951199/windows-10-system-font-size-change
There is a lot of useful info in Andrey's answer and in the Selenium issue he mentions at https://code.google.com/p/selenium/issues/detail?id=3052. Just to tie all those pieces of info together and offer a successful workaround...
I too am experiencing the issue of clicks occurring at the wrong screen coordinates -- four years after the OP first mentioned it! As others have said:
The issue is related to InternetExplorerDriver. I have the problem
when testing IE 9, but not Chrome, Firefox or even IE 8.
As mentioned in the Selenium issue, the website I'm testing uses frames.
I tried several workarounds suggested in this post and elsewhere. All of the following did NOT help:
Updating to the latest InternetExplorerDriver (version 2.47.0)
Maximizing the browser window.
Setting browser zoom to 100%.
Using an action chain, with or without move_by_offset, instead of WebDriver's click() method.
As suggested by Andrey, what DID help is using JavaScript instead of WebDriver's click() method. Here's a line of Python code that does the trick:
driver.execute_script("jQuery('{}').click();".format(css_selector))
This assumes that "driver" is an instance of Selenium WebDriver, and "css_selector" is a string identifying the element you want to click, and that jQuery is loaded.
Sounds like the element isn't present in the page's HTML, but is instead added dynamically once the page is loaded. What happens depends on how fast the machine is and how unique the text is. I'll bet that if you added a long sleep (e.g., a minute) you'd get the same result on all 3 machines. If so, that indicates the single most classic Selenium testing problem - trying to act on pages that aren't complete. You need to find an element to wait on that will guarantee the presence of the link you'd like to click on.
I just had the same issue in FireFox. The zoom was at 100% and the selection was by xpath an certainly correct. Turned out the problem disappeared when I maximized the browerwindow!
code :(python api)
self.driver.maximize_window()

WebBrowser Control is Running into Javascript Error that IE doesn't

If I use IE I can visit the website I want and click the 'Next' button and life is good. If I open that same website using the webBrowser control and click the 'Next button I get a javascript error message.
I'm not doing anything in the code to manipulate the website. My goal, eventually, is to have some level of automation; but at this point, I get the javascript error and a pop-up and it screws everything else.
I can hide the JS error from popping up; by setting 'WebBrowser1.ScriptErrorsSuppressed = True' but the page isn't working because of the error.
The client script might be assuming a full browser is present and trying to access part of the browser outside the Document Object Model (DOM) of the page. For example, maybe the client script is trying to display something on the browser's status bar, or trying to modify a toolbar which isn't available in the WebBrowserControl. There could be numerous similar reasons.
If you do not have write-access to the web page in question to try fixing it, then play with WebBrowser Control properties such as ScriptErrorsSuppressed and ObjectForScripting
Try setting WebBrowser1 Silent property to true.
Actually, you are receiving this problem because when you run your site in IE8 or IE9 on your normal internet explorer desktop app, you are getting either IE8 or IE( rendering, depending on which you have installed. However, with the webbrowser control, unless you take the effort to change soem settings in the registry, the default rendering engine used by the webbrowser control is IE7 (if u have 7, 8 or 9 installed) and IE4 (if you have 4, 5 or 6 installed).
This is why you are having the problem, if you want help changing the rendering engine version for your webbrowser control, do a google search as there are many examples on SO, and i have provided this answer in some of my previous posts on this tag/topic. feel free to search or ask me.
Let me know how you go.