Testing click keyword

Hi,

I use Visual Studio Code to develop my robot.
Why can’t I use something like “Click” keyword on a website when I manually have the page opened?
I have to use keyword “Open Available Browser” and have robot open the page before I use “Click” keyword.
This is cumbersome when I want to check a locator that is late in the process.

This will not work even if I have the page opened:
*** Tasks ***
Order robots from RobotSpareBin Industries Inc
Click Test

Error message:
KEYWORD RPA.Browser.Selenium . Capture Page Screenshot
19:53:47.139 FAIL No browser is open.

This will work:
*** Tasks ***
Order robots from RobotSpareBin Industries Inc
Open and login to webpage
Click Test

Hi! The “Click” keyword you are referring to is part of the Selenium library which in order to work has to be used on a browser that is opened and controlled by the Selenium library. When you open a browser manually the bot doesn’t have control of it and cannot utilize it unless you use the RPA.Desktop library. Here is some documentation on how to find web interfaces which should help…How to find user interface elements using locators in web applications

1 Like

Thanks for the answer.
Now that I have more understanding of this I found out that I can use “Interactive Console” for testing click or other keywords in Selenium libray. Just have to import and open the webpage from Interactive console first:

Import Library RPA.Browser.Selenium
Open Available Browser webpageurl

1 Like

And once you start building more and more into your robot, you can put breakpoints into VSCode, then running with debugger (F5) and going to “DEBUG CONSOLE” where you can execute RF instructions from that point onwards.

And for individual tasks:

1 Like