Job Interview Questions For Selenium WebDriver With Answers

Part 4

16 : How to press ENTER fundamental push on text box In selenium webdriver?
Answer : To press ENTER fundamental using selenium WebDriver software automation tool, We postulate to run selenium Enum Keys alongside Its constant ENTER equally bellow.
driver.findElement(By.xpath("//input[@id='gbqfq']")).sendKeys(Keys.ENTER);

17 : How many types of waits available In selenium WebDriver
Answer : There are 2 types of waits available In selenium WebDriver software automation testing tool.
  1. Implicit Wait
  2. Explicit Wait
VIEW TUTORIALS on Implicit as well as Explicit Waits alongside practical examples detailed description.

18 : What Is Implicit Wait In Selenium WebDriver?
Answer : Sometimes, Elements are taking fourth dimension to last seem on software spider web application page. Using Implicit expect In webdriver software testing attempt case, We tin poll the DOM for certainly sum of fourth dimension when around chemical component or elements are non available Immediately on webpage.

Implicit Wait Example :
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
If you lot volition write inward a higher house syntax In your test, Your WebDriver attempt volition expect x seconds for appearing chemical component on page.

19 : What Is Explicit Wait In Selenium WebDriver?
Answer : Using explicit expect code In selenium webdriver software automation testing tool, You can define to expect for a certainly status to come about before proceeding farther attempt code execution.

Explicit Wait Example :
WebDriverWait expect = novel WebDriverWait(driver, 20); wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//input[@id='gbqfq']")));
Above code volition expect for xx seconds for targeted chemical component to last displayed as well as enabled or nosotros tin tell clickable.

20 : I wants to intermission my attempt execution for gear upward x seconds at specific point. How tin I create It?
Answer : You tin use java.lang.Thread.sleep(long milliseconds) method to intermission the software attempt execution for specific time. If you lot wants to intermission your attempt execution for x seconds as well as hence you lot tin run bellow given syntax In your test.
Thread.sleep(10000);



More interesting articles here :Generation Enggelmundus Internet Marketing Tool here :Zeageat IM http://www.software-testing-tutorials-automation.com/
Post a Comment (0)
Previous Post Next Post