Skip to main content
Solved

Get the Coordinates of a Specified Feature in Webpage

  • Feb 22, 2023 2:00 PM UTC
  • 8 replies
  • 541 views

I am capturing an area of a window, but the size of this area varies depending on the webpage I am viewing. I would therefore like to identify a feature on the page and get its coordinates. I will then use these coordinates in the image capture package so I only capture the relevant bit. Can I do this in A360?

Best answer by Padmakumar

Hi @Rob Sytner ,

 

Why don’t you go with the Capture action with Custom XPath? 

View original

8 replies

Zaid Chougle
Navigator | Tier 3
Forum|alt.badge.img+9
  • Navigator | Tier 3
  • Feb 23, 2023 9:19 AM UTC

Hi @Rob Sytner ,

Before capturing a specific area you can try maximizing the window so that whenever your image capture the window remains the same.


  • Author
  • Navigator | Tier 3
  • Feb 23, 2023 9:34 AM UTC

Am maximising, the size of what I want to screen grab changes. I need to be able to feed variables into the screen grab coordinates as these will change.


Padmakumar
Premier Pathfinder | Tier 7
Forum|alt.badge.img+3
  • Premier Pathfinder | Tier 7
  • Answer
  • Feb 23, 2023 9:54 AM UTC

Hi @Rob Sytner ,

 

Why don’t you go with the Capture action with Custom XPath? 


Zaid Chougle
Navigator | Tier 3
Forum|alt.badge.img+9
  • Navigator | Tier 3
  • Feb 23, 2023 10:02 AM UTC

As far as my knowledge goes, in screen capture action you have to put the coordinates manually if not than it will capture the whole screen.


  • Author
  • Navigator | Tier 3
  • Feb 23, 2023 11:01 AM UTC

@Padmakumar  Is that use recorder capture to get the properties i.e. coordinates, height, width of the table I am try to get. Then use them to define my screen capture?


Padmakumar
Premier Pathfinder | Tier 7
Forum|alt.badge.img+3
  • Premier Pathfinder | Tier 7
  • Feb 23, 2023 11:08 AM UTC

@Padmakumar  Is that use recorder capture to get the properties i.e. coordinates, height, width of the table I am try to get. Then use them to define my screen capture?

 

Not exactly. This is to fetch the elements or objects available on the Webpage. Based on the type of element/object, the property will vary. You can customize Domex path if the webpage is dynamic so that, even though the value changes, your BOT will not fail to detect the element/object. 


  • Author
  • Navigator | Tier 3
  • Feb 23, 2023 11:18 AM UTC

@Padmakumar  I have definitely got something to go with now. Many thanks for the advice.


Padmakumar
Premier Pathfinder | Tier 7
Forum|alt.badge.img+3
  • Premier Pathfinder | Tier 7
  • Feb 23, 2023 11:20 AM UTC

@Padmakumar  I have definitely got something to go with now. Many thanks for the advice.

 

Most welcome.