Friday 17 April 2015

What are the different types of Element locators?

The different types of locator are:
  •  ID
  •  Name
  •  Link Text
  •  CSS Selector
  •   Tag and ID
  •   Tag and class
  •   Tag and attribute
  •  Tag, class, and attribute
  •  Inner text
  •   DOM (Document Object Model)
  •   getElementById
  •   getElementsByName
  •   dom:name
  •   dom:index
  •  XPath

There are commands that do not need a locator (such as the "open" command). However, most of them do need Locators.
The choice of locator depends largely on your Application Under Test. In this tutorial we will toggle between facebook , newtours.demoaut on basis of locators that these applications support. Likewise in your testing project you will select any of the above listed locators based on your application support.

1 comment:

  1. I got an important information from your site Sarkari Result It is useful to me thank you for your good information.

    ReplyDelete