What Are The Significant Changes in Upgrades in Various Selenium Versions?
What Are The Significant Changes in Upgrades in Various Selenium Versions?
versions?
Selenium v1 included only three suite of tools: Selenium IDE, Selenium RC and
Selenium Grid. Note that there was no WebDriver in Selenium v1. Selenium WebDriver
was introduced in Selenium v2. With the onset of WebDriver, Selenium RC got
deprecated and is not in use since. Older versions of RC is available in the market
though, but support for RC is not available. Currently, Selenium v3 is in use, and it
comprises of IDE, WebDriver and Grid.
IDE is used for recording and playback of tests, WebDriver is used for testing dynamic
web applications via a programming interface and Grid is used for deploying tests in
remote host machines.
How can you fetch an attribute from an element? How to retrieve typed
text from a textbox?
To maximize the size of browser window, you can use the following piece of code:
driver.manage().window().maximize(); – To maximize the window
To resize the current window to a particular dimension, you can use the setSize() method.
The reason we use Excel sheets is because it can be used as data source for tests
(DataDriven Testing).
User name and password credentials of different environments: You can store the access
credentials of the different applications/ environments in the excel sheet. You can store
them in encoded format and whenever you want to use them, you can decode them instead
of leaving it plain and unprotected. You can store the data for different iterations to be
performed in the tests. For example while testing a web page, the different sets of input
data that needs to be passed to the test box can be stored in the excel sheet.
Open source: Since it is an OSS, so we don’t have to bear any licensing cost for using it.
Cross-browser: It works on all standard browsers such as Chrome, FF, IE, and Safari.
We can run same the test script in all browsers.
Multi-language: We can choose a familiar programming language from Java, Python,
C#, Ruby to use with Selenium.
Cross-platform: It provides test compatibility across Window, Linux, and Mac OSX. We
can run same the test script on all platforms.
Concurrency: With Selenium Grid, we can execute thousands of test in parallel.
CLI support: We can create a test suite with hundreds of tests and launch it with a single
command.
CI support: Jenkins is the best CI tool. It provides a Selenium plugin to configure tests
for nightly execution.
Free help: We can get quick technical support from its large community.
Tester friendly: A non-programmer can also automate using Selenium. It is not too
complicated to be used only by a programmer.
Active project: Active development and bug fixes on the latest project.
It works by navigating through the DOM elements and attributes to locate the target
object. For example – a text box or a button or checkboxes.
Although, it guarantees to give you the element you are looking after. But it is slower
than as compared to other locators like ID, name or CSS selectors.
What Is The Command To Enter Text In The HTML Text Box
Using Selenium?
We can do so by using the sendKeys() method.
Hence, it is mandatory to pass the HTTP or HTTPS protocol while calling the web
driver’s get() method.
1) navigate().forward() – to move to the next web page as per the browser’s history
2) navigate().back() – to move back to the previous page as per the browser’s history
3) navigate().refresh() – to reload the current page
4) navigate().to(“URL”) – to start a new browser window and opening up the specified
link
webdriver.getCurrentUrl();
webdriver.manage().window().maximize();
webdriver.manage().deleteAllCookies();