Click activity evaluates click destination before scrolling (therefore missing after scroll)

Scenario:

Web browser-based click activity using a web selector, where the selector relates to an item that is not immediately on the screen (browser must be scrolled down to bring the item into view)

Expected behaviour:

The click activity will scroll the screen as required, and then click in the screen position of wherever the item matching the selector is located after the scroll was completed

Actual behaviour:

The click activity will scroll the screen as required, and then click in the screen position of wherever the item matching the selector was located before the scroll was completed

Affects:

  • Both Chrome andFirefox
  • Enterprise Studio/robot
    – 2018.4.5,
    – 2018.4.3,
    – and likely some earlier releases

Steps to reproduce:

Example workflow (uses Chrome. Run with uipath.com open in chrome) - Click activity failure.xaml (5.8 KB)

Scenario A
Instructions to reproduce using above workflow:

  • Navigate to uipath.com in Chrome (with uipath extension installed)
  • Leave the browser scroller at the top of page
  • Run workflow
  • The mouse click will ‘miss the screen’ entirely (vertically, not horizontally) and UiPath will throw an error

Scenario B
Now, leave the screen scrolled to a position where the orange “read article” button is visible.

  • Re-run workflow
  • Click activity will work fine

Scenario C

  • Repeat as with scenario A, but this time position the scroller such that the orange “read article” button is just outside the view. In other words, the button should be obscured only by the taskbar
  • This time uipath will click the exact position on taskbar where the button had been obscured (before uipath scrolled)
  • No exception will be thrown; uiPath will behave as if the click was successful.

Semi-workaround

Capture the click in a 2x Retry activity. The second will hit accurately, because the scroll is already done (in other words, forcing Scenario B above). This will only work if the first click does not interfere with your workflow (eg by clicking on taskbar in a way which interferes).

Hi @dmarshall,
I tested your example and seems that it’s working for me in both cases (even when I’m at the top of the page and also when I’m at read article button.

Try in your case use simulate click attribute for the click activity. This prevents from the situation where browser windows is not active.

Thanks @Pablito . My example workflow is also now running smoothly… All I did was get dinner.

How typical!

I suppose some browser and Studio restarts might have cleared something up… But I will update the post if I again encounter and can repro

2 Likes