Problem Identifying an object in Firefox and IE

Ask general questions here.
Nadeem
Posts: 10
Joined: Fri Jul 01, 2011 9:26 am

Problem Identifying an object in Firefox and IE

Post by Nadeem » Mon Jul 18, 2011 11:37 am

Hello to one and all :evil: ,

I am a new to Ranorex (Day 5). With Version 3.0.2 I am having an issue which i cannot get my head around. I want to create a script which will run in Firefox (3.6.16) and IE (8). Yet when i locate a particular button (in order to click on it) both browsers display a different path. Please see below:

IE 8
===
/dom[@domain='testing2005:3080' and @caption='Workstation Client' and @page='WorkStation.aspx' and @path='/SWMP/Skillweb/Fox/SwmpWebClient/WorkStationClient/WorkStation.aspx' and @browsername='IE']/body/form/table/tbody/tr/td[2]/div[@id='PageLayout_pnlContentHolder']/div/div/table/tbody/tr/td[@id='PageLayout_radMenuPlane']/div/div/div/div/div/div/ul/li[1]/a[@id='ddReceipt']


Firefox 3.6.16
============
/dom[@domain='testing2005:3080' and @caption='Workstation Client' and @page='WorkStation.aspx' and @path='/SWMP/Skillweb/Fox/SwmpWebClient/WorkStationClient/WorkStation.aspx' and @browsername='Mozilla']/body/form/table/tbody/tr/td[2]/div[@id='PageLayout_pnlContentHolder']/div/div/div/table/tbody/tr/td[@id='PageLayout_radMenuPlane']/div/div/div/div/div/div/ul/li[1]/a[@id='ddReceipt']

I know i can remove the "and @browsername='IE' " attribute to make it more generic but my problem lies in the following area of the path:

IE
***
div[@id='PageLayout_pnlContentHolder']/div/div/div/table/tbody/tr/td[@id='PageLayout_radMenuPlane']

Firefox
*********
div[@id='PageLayout_pnlContentHolder']/div/div/table/tbody/tr/td[@id='PageLayout_radMenuPlane']

How can i edit this part of the path or even the whole path to allow Ranorex to identify the object in both browsers.

User avatar
sdaly
Posts: 238
Joined: Mon May 10, 2010 11:04 am
Location: Dundee, Scotland

Re: Problem Identifying an object in Firefox and IE

Post by sdaly » Mon Jul 18, 2011 11:52 am

This should work using a double forward slash....
div[@id='PageLayout_pnlContentHolder']/div/div//table/tbody/tr/td[@id='PageLayout_radMenuPlane']

My understanding was though that the paths should be the same in IE and FF using the DOM....maybe the Ranorex team can clarify that?

Nadeem
Posts: 10
Joined: Fri Jul 01, 2011 9:26 am

Re: Problem Identifying an object in Firefox and IE

Post by Nadeem » Mon Jul 18, 2011 12:00 pm

Thanks for your reply. That worked. You justs aved me from pulling my hair out.

I was assuming the same as yourself; that Ranorex would identify the object with the same path in both browsers.

But i am going to throw another spanner in the works here, by saying that the object is located in a Telerik control. So maybe that might have something to do with it. I hope not. Because i will be facing similar issues like these all the time then, as a large chunk of it is using Telerik Controls.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Problem Identifying an object in Firefox and IE

Post by Support Team » Tue Jul 19, 2011 7:45 pm

Hi,

basically the document object modell of the specific browser is evaluated by Ranorex Spy.
And normally there should be no differences between different browser.
But it can be, that the dom is build different for different browsers purposefully, based on e.g.:
  • styles
  • IE bugs
  • ...
So it might be, that there are different RXPaths for different browser, but this is based on differences in the document object modlel.

Kind regards,
Tobias
Support Team