Locators
Locators
tagName()
id()
name()
className()
linkText()
partialLinkText()
cssSelector()
xpath()
source code
-------------
<a href="url" id="i1" name="n1" class="c1"> gmail </a>
Locators:
---------
tagName()-> driver.findElement(By.tagName("a"));
id()-> driver.findElement(By.id("i1"));
name()-> driver.findElement(By.name("n1"));
className()-> driver.findElement(By.className("c1"));
linkText()-> driver.findElement(By.linkText("gmail"));
partialLinkText()->driver.findElement(By.partialLinktext("gm"));
cssSelector() -> tag[an = 'av'] - > a[name='n1'], a[id='i1']
xpath by attribute
-------------------
//tag[@an = 'av'] --> //a[@id='i1']
//tag[text()='tv']-->//a[text()='gmail'] | //a[.='gmail']
static/ancestor::tag[]
| and
Types of dropdown:- two type -> Single select and multi select dropdown
POM?
it is a framework which is of java designed pattern mainly used to handle
staleElementReferenceException.
3 stages:
declaration
initialization
utilization
What is DataDrivenTesting?