You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
829 B
23 lines
829 B
5 years ago
|
# Content
|
||
|
- About
|
||
|
- How to use
|
||
|
|
||
|
# About
|
||
|
The OpenRPA support web app manipulation (by the Selenium lib).
|
||
|
More docs about selenium you can find [here](https://selenium-python.readthedocs.io/)
|
||
|
|
||
|
# How to use
|
||
|
To start use selenium just import selenium modules in [the robot tool](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/04.2.-Tool-Robot:-How-to-use). Here is the example of the usage.
|
||
|
> from selenium import webdriver <br>
|
||
|
> from selenium.webdriver.common.keys import Keys <br>
|
||
|
> <br>
|
||
|
> driver = webdriver.Chrome() <br>
|
||
|
> driver.get("http://www.python.org") <br>
|
||
|
> assert "Python" in driver.title <br>
|
||
|
> elem = driver.find_element_by_name("q") <br>
|
||
|
> elem.clear() <br>
|
||
|
> elem.send_keys("pycon") <br>
|
||
|
> elem.send_keys(Keys.RETURN) <br>
|
||
|
> assert "No results found." not in driver.page_source <br>
|
||
|
> driver.close() <br>
|