Cross browser testing issue

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
ziasim
Posts: 43
Joined: Wed Dec 16, 2015 4:03 pm

Cross browser testing issue

Post by ziasim » Tue May 16, 2017 11:31 am

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,

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Cross browser testing issue

Post by odklizec » Tue May 16, 2017 12:04 pm

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 ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

ziasim
Posts: 43
Joined: Wed Dec 16, 2015 4:03 pm

Re: Cross browser testing issue

Post by ziasim » Tue May 16, 2017 1:59 pm

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.
Attachments
Firefox_Snapshot.rxsnp
(32.03 KiB) Downloaded 25 times
Chrome.rxsnp
(144.35 KiB) Downloaded 24 times
IE_Snapshot.rxsnp
(211.79 KiB) Downloaded 21 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Cross browser testing issue

Post by odklizec » Tue May 16, 2017 2:07 pm

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)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration