39
What is IWebDriver and IWebElement?
IWebElement is a selenium class that represents an HTML element (body, table, tr, etc.) on a page in your selenium automation code. With the IWebElement instance, you can interact with an element and retrieve its attributes and properties. Some of the methods of this interface are:
- Click: Clicks this element.
- GetAttribute: Gets the value of the specified attribute for this element.
- FindElement: Finds the first IWebElement using the given method. (Inherited from IsearchContext.)
- SendKeys: Simulates typing text into the element.
- Clear: Clears the content of this element.
- Submit: Submits this element to the webserver.
The IWebDriver interface is the main interface for testing, representing an idealized web browser. The methods in this class fall into three categories:
- Control of the browser itself
- Selection of IWebElements
- Debugging aids
Some of the methods of this interface are:
- FindElement: Finds the first IWebElement using the given method.
- Close: Close the current window and quit the browser if it is the last open window.
- Navigate: Instructs the driver to navigate the browser to another location.
Comments
Post a Comment