1.0.0 • Published 10 months ago
@bishalshrestha/dock-selenium v1.0.0
DOCK SELENIUM
Python only
This is a startup directory to write the selenium scripts in python along with some customization.
Steps.
- Clone this repository.
- Edit
test_script.py
. To make changes, write selenium scripts inside the run function defination. - Always bind any selenium script with
d
while writing test scripts. For exampledriver.find_element()
should be written asd.driver.find_element()
Features
- Setting a custom wait time for the webdriver
test.wait(5)
- Settting the number of times a test should be performed
test.rerun(3, lambda: run())
- Getting the title of the page
test.getTitle()
- Checking whether the button or input type submit is clickable
test.checkClick("button")
ortest.checkClick("input")
- Checking the presence of an element in a webpage
test.checkElement("CLASS_NAME","container")
Note that, this project is still experimental and hence does not support the full render wait time for any test actions.
1.0.0
10 months ago