Selenium Tutorial

Selenium Tool Suit Versions of Selenium Selenium Testing Difference Between Selenium and QTP Advantage and Disadvantage of Selenium

Selenium IDE Topics

Selenium-IDE Introduction Installation /download  Selenium–IDE (Firefox) Installation /download Selenium–IDE (Google Chrome) Characteristics of Selenium-IDE First test case of Selenium-IDE Login test for Selenium-IDE Selenium-IDE commands Selenium-IDE locators Id locator Name Locator  X Path Locator CSS Selector Locator Locating by ID Locating by Class Locating by Attribute Locating by ID/Class & Attribute Locating by Sub-string Locating by inner text Link Text Locator Advantage and Disadvantage of Selenium-IDE

Selenium WebDriver Topics

WebDriver introduction Characteristics of WebDriver Difference Between Selenium RC and WebDriver Installation steps of WebDriver WebDriver Class Diagram/ Architecture WebDriver control commands Browser control Navigation control Web element control Operational control Data capture control Verification control WebDriver working with chrome browser WebDriver working with Firefox browser WebDriver working with internet explorer browser WebDriver working with Microsoft Edge browser WebDriver locator Id Locator Name Locator Class name Locator Xpath Locator XPath axes Link text Locator Partial link text Locator Tag name Locator Css Selector Tag and Id Tag and Class Tag and Attribute Tag, class, and Attribute Sub string matches WebDriver wait statements Drop down handling Mouse and keyboard controls Drag and drop Event Handling Window Handling: New tab/new window Alert pop up Handling Checkbox Handling Radio button Handling Selenium Assertion

CSS Selector: Attribute in Selenium IDE

CSS Selector: Attribute

  • Locating the attribute of a CSS selector, we would access the Password textbox, which is present in the login form of Facebook.
  • The Password textbox has a type attribute whose value defined as pass.
  • To create a CSS Selector attribute, we can use value, type, and name.

Syntax of CSS Selector Attribute: 

css=< [attribute=Value of attribute]>
  • Value of attribute: It denotes the value which accesses at the time of using the attribute.

Let see an example of an Attribute:

We are locating a web element by defining the CSS Selector for that particular web element.

  • Open the Firefox browser.
  • And type https://www.facebook.com in Google search box; it will redirect you to the Facebook login page.
  • And you can inspect the password text box's web element and notice that the html tag value is input and the value of name attribute is pass. 
CSS Selector Attribute

To verify the locator value:

  • Open the Test Script Editor Box in selenium IDE and click on the command text box, and write command as:

Command =verify element present 

Value = css=input [name='pass']

  • To verify the value of a locator is correct or not, click on the Find button in the selenium IDE interface and check in a browser that the password Text box highlighted.     
CSS Selector Attribute 1