Finding browser tabs in Internet Explorer

Ask general questions here.
Fergal
Certified Professional
Certified Professional
Posts: 455
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

Finding browser tabs in Internet Explorer

Post by Fergal » Mon May 26, 2014 3:02 pm

I am running tests on a web application and having difficulty with steps that involve clicking on browser tabs in IE. As an example, I have a test that has been recorded "Globally" on the Ranorex home page, when it is open in IE.

The test has the following three recorded steps:

1. Right click on the "Features" button in the nav bar
2. Left click on "Open in new tab"
3. Open the newly opened "Test Automation Tools..." tab, in IE, by left clicking on the tab in IE.

When I play the test it fails, because Ranorex can't find the tab in IE, in order to click on it.

How can I record Step 3, so that Ranorex can find the tab in IE?

Thanks


Image


Image

mzperix
Posts: 137
Joined: Fri Apr 06, 2012 12:19 pm

Re: Finding browser tabs in Internet Explorer

Post by mzperix » Mon May 26, 2014 3:34 pm

Hi,

I think the proplem lies in the parent element of your newly opened tab. TestAutomationToolsRanorexAut... element's xpath should be changed.

Code: Select all

/form[@title~'^Test\ Automation\ Tools \ \|\R']
xpath to a more appropriate, that does not contain the title of the form, rather some other attribute (like process or anything else, that is unique enough, but does not change if you switch tabs in IE).

Best Regards,
Zoltan

Fergal
Certified Professional
Certified Professional
Posts: 455
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

Re: Finding browser tabs in Internet Explorer

Post by Fergal » Wed May 28, 2014 10:37 am

Thanks Zoltan, I am working my way through the User Guide and will learn more about xPath in the near future.