IE 8/Win7 freezing when clicking link

Bug reports.
let
Posts: 17
Joined: Wed Oct 20, 2010 7:00 pm

IE 8/Win7 freezing when clicking link

Post by let » Wed Jan 05, 2011 1:03 am

I've created a very basic HTML page consisting of a series of links, and written a script to click on each of those links.

The issue that I'm running into is that when I'm running the test on a IE8/Windows 7 machine, Internet Explorer will stop responding and I have to use the task manager to kill the process. The test runs without issue on IE7/WinXP and Firefox/Win7.

Effectively all I'm doing in this test is:
1. Launch a browser:
System.Diagnostics.Process.Start("iexplore.exe", url);
2. Wait for the page to load and then build up a list of links:
IList<ATag> allTags = myTag.FindChildren<ATag>();
3. Click on the first link, wait for it to load, verify 1 piece of information, then close the page.
allTags[x].Click;

But it's in this step 3 after it does the click that IE goes to not responding. The task manager shows the process running consistently with 20% CPU, but the window itself is unresponsive. And since the first link that it's clicking on is just <a href="http://google.com">Google</a> it's not like there's a lot happening. I've tried launching in a new window (target="_blank") but get the same issue

Given that I can click on these links manually (and the configurations noted above), I'm wondering what the issue is with using Ranorex and the combination of IE8/Win7?

Let me know if you need any more information.

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: IE 8/Win7 freezing when clicking link

Post by Ciege » Wed Jan 05, 2011 4:31 pm

Can you post the code you are using?
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

let
Posts: 17
Joined: Wed Oct 20, 2010 7:00 pm

Re: IE 8/Win7 freezing when clicking link

Post by let » Wed Jan 05, 2011 5:15 pm

Sure. I've stripped the code down to the following and I'm still running into the issue.

Code: Select all

		public static void basicLandings(string urlAddress) {
			Public.com.util.CommonPublicUtility.openPublicBrowser(urlAddress);
			Delay.Seconds(3);
			BodyTag bTag = Public.PublicRepository.Instance.ReferralLinkPage.Self;
			IList<ATag> allTags = bTag.FindChildren<ATag>();
			int count = allTags.Count;
			for (int x=0; x < count; x++) {			
				ATag tagItem = allTags[x];
				tagItem.Click();
				Delay.Seconds(2);
			}
The web page I created consists just of the <html>, <body>, and <a href> tags.

I'm guessing you haven't run into any kind of similar issue Ciege?

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: IE 8/Win7 freezing when clicking link

Post by Ciege » Wed Jan 05, 2011 5:31 pm

I'm guessing you haven't run into any kind of similar issue Ciege?
Not directly, but that doesn't mean anything...

In the code you posted, which line is causing you issue?
What are you doing to verify that a page has loaded and ready to click the next link? I don't see a check for readystate of the browser. It might be that the browser isn't in a proper state and cannot find the link to click within your 2 second delay. I would definitely suggest checking browser state instead of a hard 2 second delay.
Have you run the code in the debugger and watch the variables and other steps to see what is actually happening?
Also try adding logging information to your code to log each step as it happens and log current states of your variables.
If this is only causing issue on IE8/Win7 it may be an issue with the UAC or some popup or information bar that is waiting for user input to continue.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

let
Posts: 17
Joined: Wed Oct 20, 2010 7:00 pm

Re: IE 8/Win7 freezing when clicking link

Post by let » Wed Jan 05, 2011 6:06 pm

tagItem.Click() is the line causing issues. Stepping through the code, the IList looks the way that I expect, and the page starts loading (the address bar and page title in IE will be updated) but the page never fully loads. I've changed the delay to 60 seconds (and added breakpoints), but there's no difference on the behavior of the test.

The thing that I'm most confused by is that if I open IE manually and try to click these links I can do so without any problems.

But if I open IE using a Ranorex call to
System.Diagnostics.Process.Start("iexplore.exe", url);

And then manually click the links, IE will freeze.

Do I have any other options for launching IE besides process.start?

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: IE 8/Win7 freezing when clicking link

Post by Ciege » Wed Jan 05, 2011 6:22 pm

Hmmm, interesting...

Things to try.

1) Try disabling the Ranorex IE Add-On to see if there is an issue with that.
2) Change your Click() to a PerformClick() to see if that works.
3) Before you click the link, verify the .Valid property of the link.


What version of Ranorex are you using?
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

let
Posts: 17
Joined: Wed Oct 20, 2010 7:00 pm

Re: IE 8/Win7 freezing when clicking link

Post by let » Wed Jan 05, 2011 6:52 pm

I think you're on to something with the UAC/security. The page that I'm initially loading has the IE8 "Protected Mode" turned off, but the links that I'm attempted to click turn Protected Mode on, and I'm guessing there's some restriction with the process that Ranorex is spawning.

When I put the initial page in another location where Protected Mode is enabled, the test seems to run without issue.

Huh.

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: IE 8/Win7 freezing when clicking link

Post by Ciege » Wed Jan 05, 2011 7:13 pm

I believe the process that is running IE (when started by Ranorex) is a different process than the user process. So the UAC blocks IE from accessing the protected stuff.
You will probably need to disable the UAC to continue with these specific tests on Win7.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

let
Posts: 17
Joined: Wed Oct 20, 2010 7:00 pm

Re: IE 8/Win7 freezing when clicking link

Post by let » Wed Jan 05, 2011 7:50 pm

Thanks for your assistance on this!

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: IE 8/Win7 freezing when clicking link

Post by Support Team » Fri Jan 07, 2011 11:59 am

let, were you able to solve the issue by disabling UAC?

Security issues can be a problem for Ranorex to communicate with Internet Explorer and to access the HTML structure of a page.

Regards,
Alex
Ranorex Team
.
Image

let
Posts: 17
Joined: Wed Oct 20, 2010 7:00 pm

Re: IE 8/Win7 freezing when clicking link

Post by let » Fri Jan 07, 2011 6:11 pm

No, I didn't disable that. I ended up just putting the list of links out on the "Internet" zone so IE didn't have to change protection levels.

Thanks!