Scrolling Not Working on IE/Element Not Visible on IE

Ask general questions here.
Gowtham
Posts: 22
Joined: Fri Oct 26, 2018 1:42 pm

Scrolling Not Working on IE/Element Not Visible on IE

Post by Gowtham » Tue Jan 22, 2019 3:13 am

Hi,

I have a weird situation.

-> Scrolling was not working properly with my real time application. So I decided to check it with a simple recording.

-> So I did a simple recording. A simple google search of ranorex. I have scrolled down(mousewheel action) a bit and clicked on Ranorex Studio-Wikipedia link as shown below.
while_recording.png
while_recording.png (63.97 KiB) Viewed 221 times
-> When I play back the script on IE, the link goes behind the google search bar. However, the mouse click action attempts to click on the link. As there is no element to click nothing happens after that.
mouse_click_area.jpg
mouse_click_area.jpg (126.67 KiB) Viewed 221 times
-> I have tried using ensureVisible() method. But it doesn't seem to work.
-> I have tried changing the mousewheel value also. But it doesn't seem to be helping at all.
ranorex.jpg
ranorex.jpg (215.6 KiB) Viewed 221 times

This is working perfectly fine on Chrome.

Ranorex Version : 8.3.2
IE Version : 11.523.x

Kindly help me resolving this issue.

Thanks & Regards,
Gowtham.

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

Re: Scrolling Not Working on IE/Element Not Visible on IE

Post by odklizec » Tue Jan 22, 2019 10:29 am

Hi,

I'm not experiencing problem like this. I think it's either OS/IE version or Ranorex settings problem? I'm on Win 10 Pro/IE 11.55.17763 and Windows Server 2012 R2/IE 11.0.9600. Everything works as expected.

Have you tried to reproduce the problem on another computer? Also, have you tried to change Ranorex settings, e.g. toggling Use asynchronous dispatching of mouse and keyboard events option (Settings >> Advanced tab)? And finally, do you have enabled "Ensure Visible" as default option for repository elements?
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

Gowtham
Posts: 22
Joined: Fri Oct 26, 2018 1:42 pm

Re: Scrolling Not Working on IE/Element Not Visible on IE

Post by Gowtham » Wed Jan 23, 2019 10:37 am

Hi odklizec,

Thanks for the reply.

Now the problem is resolved.

-> Yes. I had the same problem on Windows 8.1 as well as on Windows 10.

-> Yes. The settings are fine. I have enabled 'ensure visible by default' under General tab, and 'Use asynchronous dispatching of mouse and keyboard events' is also enabled under Advanced tab.

-> However, I have tried using Wait for action (element to be exist). The problem is solved!

-> But is this the proper solution for my problem? I did lot of recordings after that and ran it on different browsers. So far no issues. Having said that, I still have odd thoughts about using Wait for to resolve the issue.

Thanks & Regards,
Gowtham.

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

Re: Scrolling Not Working on IE/Element Not Visible on IE

Post by odklizec » Wed Jan 23, 2019 10:51 am

Hi,

WaitFor is good solution. Definitely better than using hardcoded Delay ;) Another solution might be to add @state='complete' attribute to DOM element xpath, like this...
/dom[@domain='www.google.com'][@state='complete']
Eventually, you can add InvokeAction for DOM element, with WaitForDocumentLoaded method. Both state=complete and WaitForDocumentLoaded should pause the test execution until the page is fully loaded.
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

Gowtham
Posts: 22
Joined: Fri Oct 26, 2018 1:42 pm

Re: Scrolling Not Working on IE/Element Not Visible on IE

Post by Gowtham » Thu Jan 24, 2019 4:55 am

Hi odklizec,

Thanks for the reply :D

=> I tried using @state in DOM. But I don't think it is helping much. I could not find any difference.

=> But however, adding WaitForDocumentLoaded() method definitely improved the stability. Now the playback works flawlessly across all the major browsers. I think I will stick to WaitForDocumentLoaded() method.

Thanks for the suggestions.

Thanks & Regards,
Gowtham