DEV Community

skptricks
skptricks

Posted on

Selenium WebDriver and WebElement Commands

Post Link : https://www.skptricks.com/2018/03/selenium-webdriver-and-webelement-commads-action.html

WebDriver is a web automation framework that allows you to execute your tests against different browsers using their corresponding driver functions. Also it allows us to use a programming language in creating test scripts.
programming languages are supported by WebDriver as follows :
Java
.Net
PHP
Python
Perl
Ruby
selenium webdriver webelement, selenium webdriver webelement list, selenium webdriver webelement getattribute, selenium webdriver webelement exist, selenium webdriver webelement parent, selenium webdriver webelement sendkeys, selenium webdriver webelement commands,selenium webdriver webelement click

Selenium WebDriver and WebElement Commands

WebDriver is implementing classes one should use are listed as below:
ChromeDriver
EventFiringWebDriver
FirefoxDriver
HtmlUnitDriver
InternetExplorerDriver
PhantomJSDriver
RemoteWebDriver
SafariDriver
NOTE : Depending upon the browser, we are selecting the above WebDriver method.

While automating the test cases we are selecting the desired WebElement from the web pages and performing the desire operation as per the need. It is a essential part because it helps us to uniquely identify the HTML element or web objects from the web browser page.

What is WebElement ?
WebElement is an HTML element that helps the users to drive automation tests. Selenium WebDriver provides well-organized web page interactions through WebElements, such as locating elements, getting attribute properties, asserting text present in WebElement, and more. However, to interact with hidden elements in a web page, it is necessary to unhide the hidden elements first and then find the element in web page. Also you can refer below link to build more understanding on WebElement :
https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html

NOTE : WebElement is an interface

OR succinctly,
WebElement represents an HTML element and HTML elements are written with a start tag, with an end tag, with the content in between: content .

Read More...

Top comments (0)