1

I am faced with user acceptance testing a website used in a previous project. I want to find the texted hyperlink and click on it based on a value extracted from excel. The text, as well as the position of the hyperlink changes on each iteration.

I found the solution!

Make use of a click text activity. When indicating the element on the screen make sure you select the whole element where the search is required. In my case it returned this 'col-md-10' value at the webctrl class but I don't know if it will be applicable to everyone. The second and most important thing to look at that kept me busy for a while is the OffsetX and OffsetY properties in the properties pane. You will see that when running the process the cursor will move to the correct place to click BUT it will fall short (either not up enough or to left etc). This is because the center pixels of the activity and HTML differ. Play around with the offset. In my case all it needed was a '-20' at the OffsetY property.This is the website I automated and wanted to click on the hyperlinked zone names The webctrl class value

Morné
  • 11
  • 2

2 Answers2

0

It is good that you found a solution. Another solution might be to use a selector seeking a full xpath to locate the element and click it.

You can always hit F12 in your browser, and locate the element in question (or just right click the element and click examine). From there you can Right click the element in the developer tab and copy full xpath!

That may be a more versatile solution which shouldn't run into trouble "aiming" the click.

Jens-Emil
  • 56
  • 8
0

I think part of the poster's point may have been missed. My personal example is a 2-line URL-type clickable item : wrapped because the encompassing area is too small width wise. The normal click activity falls (vertically) exactly between those 2 lines. And THAT area is not clickable. i.e. It shows an Arrow instead of a Finger/Hand. So it kind of needs to go to the selected item, and then UP a handful of pixels - allowing it to change from an arrow to a Finger/Hand (and allow clicking). I'm going to try Click-Text and see if that works.

DocW
  • 1