Page 1 of 1

Cross browser testing issue

Posted: Tue May 16, 2017 11:31 am
by ziasim
Hi,

I am trying to learn cross browser testing using Ranorex but having some difficulty in object identification. At the moment I am using IE v11, Chrome v58 and Firefox v53 to validate an error message shows in AUT. All three browsers are using different Xpath to identify this error message in AUT. Here is the path detail for same object under different browsers

1) IE

/dom[@domain='IPAddress']//div[#'GWTAPP_mainPanel']/div/div[2]/div/div/div/div[2]/div[1]/div/div/?/?/form[@method='POST']/div/?/?/div[@innertext~'^The\ form\ is\ not\ valid\ to\ ']

2) Chrome

/dom[@domain='IPAddress']//div[#'GWTAPP_mainPanel']/div/div[2]/div/div/div/div[2]/div[1]//form[@method='post']/div/?/?/div[@innertext~'^The\ form\ is\ not\ valid\ to\ ']

3) Firefox

/form[@title~'^APAS\ Admin\ -\ Login\ -\ -\ Mo']/container[@accessiblerole='Grouping']//container[@accessiblename='APAS Admin - Login -']/element[1]/table[@accessiblerole='Table']/row[@accessiblerole='Row']/?/?/table[@accessiblerole='Table']/row[4]//table[@accessiblerole='Table']/row[@accessiblename='AndPhone Login']/cell/element[@accessiblerole='None']/element[2]/element/element[2]//container[@accessiblename='Messages ']/?/?/text[@accessiblename~'^The\ form\ is\ not\ valid\ to\ ']

Having three different Xpath for same object, how can I test this object in AUT on different browsers?

Any help would be appreciated.

Regards,

Re: Cross browser testing issue

Posted: Tue May 16, 2017 12:04 pm
by odklizec
Hi,

Could you please post a Ranorex snapshot for given element taken in all three browsers (so 3 snapshots in total).

Also, make sure there is installed and enabled Ranorex plugin in Firefox. FF xpath is apparently not accessing DOM object and this is most probably caused by not installed/enabled Ranorex plugin.

As for the IE and Chrome, this xpath should work in both browsers:
/dom[@domain='IPAddress']//div[#'GWTAPP_mainPanel']/div//form[@method~'^(?i:post)$']/div/?/?/div[@innertext~'^The\ form\ is\ not\ valid\ to\ ']
However, without seeing at lest the snapshot, it's only a guess ;)

Re: Cross browser testing issue

Posted: Tue May 16, 2017 1:59 pm
by ziasim
Thank for reply

Please find attached snapshots of same element in 3 browsers.
odklizec wrote:
Also, make sure there is installed and enabled Ranorex plugin in Firefox. FF xpath is apparently not accessing DOM object and this is most probably caused by not installed/enabled Ranorex plugin.
I don't know why Firefox keeps me showing warning regarding Ranorex add-on although had installed and enabled it in my browser. Any workaround for this?
Already tried removing and re-installing it again using instrumentation wizard many times but still getting same warning each time when try to run AUT in Firefox.

Re: Cross browser testing issue

Posted: Tue May 16, 2017 2:07 pm
by odklizec
It seems your actual version of Ranorex is 6.2. Try to install (at least) 6.2.1, which is the latest supported 6.x version.

I don't have a clue why the wizard installation of Ranorex FF addon fails for you. Anyway, you can always try to install it manually. Just drag & drop Ranorex NG plugin to FF window (you can find the plugin here:
C:\Program Files (x86)\Ranorex\Bin\Ranorex-FF-New.xpi)