Python Selenium With Pytest
Python Selenium With Pytest
Python Selenium With Pytest
● Python Basics
● Chrome Web Browser ● PYTHON
● Internet Connection ● PYCHARM
Documents:
● Selenium unofficial
Selenium architecture
Navigation:
driver.get("{website_url}")
Locators (to locate the web element):
● ID = "id"
● XPATH = "xpath"
● LINK_TEXT = "link text"
● PARTIAL_LINK_TEXT = "partial link text"
● NAME = "name"
● TAG_NAME = "tag name"
● CLASS_NAME = "class name"
● CSS_SELECTOR = "css selector"
Common Actions:
● .send_keys() = to enter input value in a blank
● .click() = to give click command
● .clear() = to clear the input field
● .text = to copy the text
CSS Selector Locator
FROM SYNTAX
ID tagname#IDvalue
Class tagname.classvalue
FROM SYNTAX
contains //tagname[contains(@attribute,’value’)]
Pytest Document
PYTHON SELENIUM
with PYTEST
( HINDI 2023 )