Selenium Notes
Selenium Notes
Jnuit : JUnit is a unit testing open-source framework for the Java programming language.
Java Developers use this framework to write and execute automated tests. In Java, there are
test cases that have to be re-executed every time a new code is added.
JavaScriptExecutor:
There are scenarios where the Webdriver commands will not work as expected due to various reasons. In
these cases, we take the help of JavaScriptExecutor.
For example, traditionally to locate a web element we use different web locator strategies such as ID,
Name, CSS selector, and XPath, etc. If these locators do not work as expected, or you are handling a
tricky XPath, you can use JavaScriptExecutor to perform the desired operation on the WebElement.
Driver Factory :
WebDriver by design is not thread safe so if you intend to have several threads to run different
webdriver instances you need to wrap them into ThreadLocal and most probably the "DriverFactory"
you're talking about is a helper class which initializes webdriver puts it to ThreadLocal.
Send keys:
Send keys is used to send any value in textfield or textbox syntax for this is
Driver.findelement.by.id(example).sendkeys(“taimoora”)
webElement:
web element is like we create variable in java
in java we use like int and then variable name
in selenium we write WebElement then variable name
DataTable :
Datatable is a process in which we can send any data or value through feature file
into application
Can we send data through feature file into function? Yes we can in which we have
to apply “ ” on the data which we want to send into function