• What is Automation Testing - Advantages & Types of Tools
  • What is Selenium IDE, Selenium RC, Selenium WebDriver, Selenium Grid?
  • Selenium IDE, Firebug & Firepath Installation


  • Selenium WebDriver Architecture
  • Selenium Installation
  • Challenges and Limitations of Selenium
  • First Selenium WebDriver Script
  • Working with Firefox Browser
  • Solution - Failed To Launch Browser Using Selenium WebDriver
  • Working with Chrome Browser
  • Working with IE Browser
  • Difference Between FindElement & FindElements
  • Install Firebug, Fire path and other add on for Selenium
  • Locators in Selenium
  • Dynamic Xpath
  • Dynamic CSS
  • Handle drop-downs
  • How to work with file upload
  • Handle Alerts & Popups
  • Handle Multiple Windows
  • Mouse Hover event in Selenium
  • Right Click
  • Double Click
  • Drag and Drop
  • Capture Screenshots in Selenium
  • Parameterization
  • Synchronization
  • Implicit Wait, Explicit Wait and Fluent Wait in Selenium
  • Implicit Waits
  • Explicit WebDriver Waits
  • Fluent Wait In Selenium
  • Apache POI
  • How To Read Data From Excel File
  • How To Write Data In Excel File
  • Database Testing Using MSSQL
  • Database Testing Using MySQL
  • Database Testing Using DB2
  • Handle Ajax Call in Selenium
  • Listeners in Selenium
  • Handling JavaScript in Selenium
  • Stale Element Reference Exception in Selenium
  • Integrate Sikuli with Selenium
  • Headless Browser Testing 
  • Headless Browser Testing using HtmlUnitDriver
  • Headless Browser Testing using PhanthomJSDriver


  • TestNG Installation
  • TestNG Complete Tutorial


  • Extent Reports Introduction
  • Extent Reports Generation
  • Capturing Screenshots & Including In Extent Reports
  • Extent Reports Version 4


  • ANT Build Tool - How To Download & Install
  • Maven Build Tool - How To Download & Install
  • Creating Maven Selenium Project
  • GIT Integration with Selenium
  • Jenkins - How To Download & Install
  • Jenkins - Executing TestNG Scripts
  • Jenkins - Generating Reports After Test Execution
  • Jenkins - Executing Maven Project
  • Create build and Execute build for nightly execution
  • Send Email report based on build Status
  • Selenium Continuous Integration with Jenkins [Selenium – Maven – Git – Jenkins] – Step By Step Guide


  • Running Selenium Tests On BrowserStack
  • Kobiton - Mobile Testing Platform with Real Devices


  • Mobile Testing Platform with Real Devices


  • What is Framework & Types of Framework
  • Page Object Model Design Pattern
  • Data Driven Framework
  • How to explain Test Automation Framework or Selenium Automation Framework Architecture In Interview

  • API Testing:

  • Learn API Testing
  • Postman Tutorial (API Testing with Postman)


  • Test Automation Framework Interview Questions
  • Selenium Interview Questions
  • TestNG Interview Questions
  • Java Interview Questions
  • Python Interview Questions
  • API Testing Interview Questions


  • Automation Tester Resume
  • Webelement commands in Selenium Python

    In the previous articles on Selenium Python Tutorial, we have covered “Synchronization in Selenium Python“. In this tutorial, we will learn Webelement commands in Selenium Python.

    Let us discuss some of the common Webelement commands used in Selenium Python. With the help of the web element commands, we can successfully perform actions on elements and also validate its behavior and other characteristics.

    What is WebElement?

    WebElement in Selenium represents an HTML element. It basically represents a DOM element in a HTML document.

    WebElement Commands in Selenium Python

    The following are some of the most commonly used WebElement commands in Selenium WebDriver.

    send_keys ()

    This is a method that is used to input text in an edit box, text area, fields inside the form, and so on. This method can also be used for setting up file inputs and to send modifier keys from the Keys class.

    click ()

    This is a method that is used to click on a link or button. The element to be clicked is specified in the parameter of the method. If no parameter is mentioned, the present mouse position is clicked.

    InvalidElementException is thrown if we try to click on an element in a disabled state.

    Code Implementation with click () method.

    clear ()

    This is a method that is used to clear the text from an edit box or a text area. Once the existing text is cleared, send_keys () method is applied to again input our desired text. Code Implementation with a clear () method.

    submit ()

    This is a method that can be used with any element within the form tag. It waits to complete the page load and submit the form. Code Implementation with submit () method.


    This is used to fetch the inner text of an element. It mainly takes care of the text displayed on the screen with its sub-elements without considering the leading and trailing spaces. Code Implementation with text.

    get_attribute ()

    This method is used to get the attribute or property value of an element. This method identifies the key-value pair in an HTML document. If a value is not set for an attribute in the HTML document, none is retrieved by the method. In case an attribute value is in Boolean, the get_attribute () method gives true or false. The attribute which we want to fetch is passed as an argument to the method. Code Implementation with get_attribute ().

    value_of_css_property ()

    This method is used to get the value of the CSS property of the element. The method accepts the name of the CSS property for which we want to get the value. Code Implementation with value_of_css_property ().

    is_displayed ()

    This method is used to check if the web element is displayed on the page or not. This method gives a Boolean value of either true or false. Sometimes an element contains an attribute as hidden. In that case, Selenium considers that element is not visible on the page and returns false. Code Implementation with is_displayed ().

    is_enabled ()

    This method is used to check if the web element is enabled or not. This method gives a Boolean value of either true or false depending on the condition of the element. If an element does not contain the enabled attribute, the is_enabled () method gives true value. Code Implementation with is_enabled ().

    is_selected ()

    This method is used to check if the web element is selected or not. This method gives a Boolean value of either true or false depending on the condition of the element. This method is used for radio buttons, checkboxes, and dropdowns, and so on. Code Implementation with is_selected ().


    This method is used to get the web element location in terms of x and y coordinates. Code Implementation with location method.

    In the next article, we will learn How To Handle Child Window, Frames, Alerts in Selenium Python

    Related posts:

    Get our latest blog posts delivered to your inbox

    Subscribe and get popular blog posts about software testing industry.


    Leave a Comment

    Share via
    Copy link
    Powered by Social Snap