I have created a test that checks the following:
You open the browser on a remote windows client (either Firefox/Chrome or Edge using their webdriver and selenium server), the browser opens with a URL, either Facebook or Paypal or another phishing URL.
It goes to an element of my choosing (either the email/username/password) according to its xpath,clicks it, and checks if the site was blocked or allowed depending on my phishing signature.
Now, this test works but if I'd like to add more sites for tests later on, I'd have to either create new tests for each new site or change the xpath of the tests I have. It's not a very reliable method of testing (as xpaths can also change on a webpage).
I would like to have the same test in a more reusable format.
The test I would like to do is:
- Open a webpage.
- Scan for any forms or input type fields.
- Click each element found one after the other and wait for a verdict for each of some kind (either a redirect to a block page or if the page remained open after clicking).
Are there any keywords in robot that know how to handle that?
Was wondering if the Robot Framework has something similar to what is already done.