Support Portal

for ProcessRobot and WinAutomation

Start a new topic
Answered

How to capture selector from a pop-up window?

Normally I use web recorder to capture selectors of my process. I am trying to click on 'select categories' from the right side of the attached screenshot and then click on the checkbox of several options on the left. How can I achieve this. I don't know any programming so building a selector on my own is not possible. Thanks in advance for any help.

Capture.JPG
(153 KB)

Best Answer

You could try something adding some actions similar to this:

 • "Click Link on Web Page": In order to click the "Select Categories" button you may use the Click Link on Web Page and Add a control to the "Select Categories" element

 • "Launch New Firefox":  Since the "CPV Caterogory" Window opens in a new window you will need to add a second Launch New Firefox action and Choose the "Attach to Running Firefox" option from the action's properties in order to for the following actions to "know" in which browser instance/window to "attach to".

 • "Wait for Window": with the option (Wait For Window To: Open) in order to make sure that the new window is open.

 • "Set Checkbox State on Web Page":  and capture the check-boxes that you wish to mark as checked.

This should work with capturing the website's elements (Add Control option) without the need to build your own selectors by using the UI/Spy and by specifying (by pressing CTRL + Click) on the element you want to click/mark as checked to. 

Finally, in case some additional configuration might be needed and building a selector on your own is not something you are familiar with you may then use OCR related actions such as Move Mouse to Text on Screen (OCR) and select a sub-region of the browser's window > move the mouse to this position and click on it (Send a left Click after moving mouse under Advanced Tab of action's properties).


ADMIN
Answer

You could try something adding some actions similar to this:

 • "Click Link on Web Page": In order to click the "Select Categories" button you may use the Click Link on Web Page and Add a control to the "Select Categories" element

 • "Launch New Firefox":  Since the "CPV Caterogory" Window opens in a new window you will need to add a second Launch New Firefox action and Choose the "Attach to Running Firefox" option from the action's properties in order to for the following actions to "know" in which browser instance/window to "attach to".

 • "Wait for Window": with the option (Wait For Window To: Open) in order to make sure that the new window is open.

 • "Set Checkbox State on Web Page":  and capture the check-boxes that you wish to mark as checked.

This should work with capturing the website's elements (Add Control option) without the need to build your own selectors by using the UI/Spy and by specifying (by pressing CTRL + Click) on the element you want to click/mark as checked to. 

Finally, in case some additional configuration might be needed and building a selector on your own is not something you are familiar with you may then use OCR related actions such as Move Mouse to Text on Screen (OCR) and select a sub-region of the browser's window > move the mouse to this position and click on it (Send a left Click after moving mouse under Advanced Tab of action's properties).


1 person likes this

Thank you very much for your help. I have one question though. If I want to learn building my own selector for cases like above where can I start? Should I start learning html/css etc.?

ADMIN

You are most welcome. You are correct that in cases like this knowledge of HTML and CSS can be really helpful. In order to start learning HTML/CSS  you could refer to the following documentation and websites  just to name a few resources:


https://softomotive.com/winautomation_manual/manual/css_selectors.html 

 https://softomotive.com/winautomation_manual/manual/building_a_webautomation_process.html 


as well as


w3schools.com/css/css_intro.asp

https://www.w3schools.com/html/default.asp 

https://www.w3schools.com/cssref/css_selectors.asp 

https://www.tutorialspoint.com/css/index.htm 

https://internetingishard.com/html-and-css/css-selectors/ 

https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors 


Hope you find this information useful.

Login or Signup to post a comment