I'm new in IT and automation QA, I have a trouble in using Selenium library and SeleniumLibrary in RobotFramework. As I know, the SeleniumLibrary will support using method as Keyword in Robot Framework (RF). Suppose in *.py file I can use Selenium to call open browser:
driver = webdriver.Chrome() driver.get("https://google.com") ...
and in *.robot I open a browser with SeleniumLibrary like:
open browser https://google.com
While researching for many solutions, I found many tutorials in Selenium and it was easy to understand and apply, but in my project, they's been extending the SeleniumLibrary by:
driver = SeleniumLibrary driver.open_browser("https://google.com")
= driver.get("https://google.com")
in *.py (from selenium import webdriver
)
I feel hard to read the source code of SeleniumLibrary e.g If I need to use find_element(By.ID/CSS/etc.., "abc")
in *.py and in SeleniumLibrary I only searched that
def find_element( self, locator: str, tag: Optional[str] = None, required: bool = True, parent: WebElement = None, )
I dont how to write code like before with selenium.webdriver.. Does anyone help me to clear them? How can I use driver.find_element
(of SeleniumLibrary) in *.py file that equals driver.find_element_by_CSS_selector
(of Selenium.webdriver)