cancel
Showing results for 
Search instead for 
Did you mean: 

how to get coordinate of a web element

ManojPatidar
Level 3

Hi everyone,

I am trying to capture screenshot of a web element of a web page.

i got logic for how to capture screenshot but stuck with how to get the coordinates of the web element.

If anyone have any idea or worked with same. Please let me know

Thanks



------------------------------
Manoj Patidar
------------------------------
11 REPLIES 11

Hi Manoj, Looks like you are looking for screenshot VBO?

if so check below threads for screenshot VBO
https://community.blueprism.com/viewdocument/re-screenshot-vbo?CommunityKey=1e516cfe-4d1f-4de9-a9eb-58d15bf38c81&tab=librarydocuments

https://community.blueprism.com/communities/community-home/digestviewer/view-question?ContributedContentKey=d3e9064b-6cd3-4846-99ac-9ea618946547&CommunityKey=1e516cfe-4d1f-4de9-a9eb-58d15bf38c81



------------------------------
-----------------------
If I answered your query. Please mark it as the "Best Answer"

Harish Mogulluri
Lead developer
America/New_York TX
------------------------------
-----------------------
If I answered your query. Please mark it as the Best Answer

Harish Mogulluri

Hi Harish,

Thanks for your time and effort.

I want to capture screenshot and I got logic for that but the coordinates passed into the code are static and I want to capture  a particular div tag of a web page.

don't know how to do that.

If you know anything please let me know.



------------------------------
Manoj Patidar
------------------------------

Babjee24
Level 7

Hi Manoj,

If you're looking for the co-ordinates of an HTML element then using a reader stage you can use the property get screen bounds which gives the co-ordinates of the HTML element attaching the screenshot for your reference

23661.png



------------------------------
Babjee Vangipurapu
Senior RPA Developer
Wonderbotz
India
------------------------------
Babjee Vangipurapu
Senior RPA Developer
India

Hi Babjee, 

Hope you are doing great.

I used Read stage and I am getting relative coordinates to the web page but not relative to the window size, so when I am trying to use them to capture screenshot I am getting image of other part.

While to suggest something for this, on how to get coordinates relative to windows instead of webpage.

Thanks and Regards

Manoj Patidar



------------------------------
Manoj Patidar
------------------------------

Hi Manoj,

As part of the best practice you can use maximize window after launch for the browser and then try getting the co-ordinates. Please let me know if you're still unable to get the correct co-ordinates.



------------------------------
Babjee Vangipurapu
Senior RPA Developer
Wonderbotz
India
------------------------------
Babjee Vangipurapu
Senior RPA Developer
India

HI Babjee,

Hope you are doing great.

can you help me with how to maximize the browser window. I am using type of application as browser based application in application modeller. I used global send key event where i am passing "{F11}" in text field in input.

23670.png

Thanks and Regards.



------------------------------
Manoj Patidar
------------------------------

Hi Manoj,

You can spy whole window in win 32 mode in app modeller and then you can see maximize action in  navigation stage.



------------------------------
-----------------------
If I answered your query. Please mark it as the "Best Answer"

Harish Mogulluri
Lead developer
America/New_York TX
------------------------------
-----------------------
If I answered your query. Please mark it as the Best Answer

Harish Mogulluri

Hi Manoj,

As suggested by Harish switch to Win32 mode resize the browser window, spy the entire chrome window as shown in the below screenshot

23678.png

Then using the element you'll get the Maximise option as shown below

23680.png

Hope this helps...



------------------------------
Babjee Vangipurapu
Senior RPA Developer
Wonderbotz
India
------------------------------

Babjee Vangipurapu
Senior RPA Developer
India

@ManojPatidar

You can try this command after the URL --force-renderer-accessibility --start-maximized so that screen will be maximised automatically.

[URL] --force-renderer-accessibility --start-maximized



------------------------------
SYED FAHEEM
RPA Developer
DAR-ME
Asia/Kolkata
------------------------------