Professional Documents
Culture Documents
Firefox (Below v.47) Refer System.setProperty("webdriver.geck‐ Locating by DOM Refer dom =document.getElementById('sign‐
Part2-Page58 o.driver", "PathTo\\geckodriver.exe"); Part2-Page39 inForm')
Download from https://gith‐ WebDriver driver = new FirefoxDr‐ Locating by CSS Refer driver.FindElement(By.CssSelector("#r‐
ub.com/mozilla/geckodriv‐ iver(); Part2-Page40-43 ightbar > .menu > li:nth-of-type(2) >
er/releases h4"));
ChromeRefer Part2-Page59 System.setProperty("WebDriver.chro‐ Locating by ClassN‐ driver.findElement(By.className("prof‐
me.driver", System.getProperty("us‐ ameRefer Part2-Page37 ile-header"));
er.dir")+"//BrowserDrivers//chromed‐ Locating by TagNam‐ driver.findElement(By.tagName("sel‐
river.exe"); eRefer Part2-Page37 ect")).Click();
Download from https://site‐ WebDriver driver = new ChromeDri‐
Locating by LinkTe‐ driver.findElement(By.linkText("NextP‐
s.google.com/a/chromium.o‐ ver();
xtRefer Part2-Page37-40 age")).click();
rg/chromedriver/downloads
Locating by PartialLi‐ driver.findElement(By.partialLinkText("N‐
Internet ExplorerRefer System.setProperty("WebDriver.ie.d‐
nkTextRefer Part2-Pag‐ extP")).click();
Part2-Page59 river", "PathTo//IEDriverServer.exe"); e37-40
Practice Scripts
Launch driver.get("www.webdriverinselenium.com");
https://www.udemy.com/course/certified-selenium-tester-foundation/
WebpageRefer
Part2-Page60
ISTQB Advanced Test Automation Engineering
Click Button‐ driver.findElement(By.id("submit")).click();
Refer Part2-Page60
Implicit driver.manage().timeouts().implicitlyWait(10,
WaitRefer TimeUnit.SECONDS); actions.perform() ;
Part2-Page69
Element validation
Explicit WebDriverWait wait = new WebDriverWait(driver,
WaitRefer 20); isEnabl‐ determines if an element is enabled or not, returns a
Part2-Page70 ed() boolean.
isSelec‐ determines if an element is selected or not, returns a
wait.until(ExpectedConditions.textToBePresent‐
ted() boolean.
InElementLocated(By.xpath("//div[@id='<Object
ID>']"), "Enter Your Personal Details")); isDispl‐ determines if an element is displayed or not, returns a
ayed() boolean.
Fluent Wait wait = new FluentWait(driver)
WaitRefer
Part2-Page70 Handle multiple windows and tabs
Navigation