Part 8
36 : When I am running software spider web application's tests In Firefox Browser using selenium webdriver, It Is non showing me whatever bookmarks, addons, saved passwords etc. In that browser. Do you lot know why?
Answer : Yes. It Is because all those bookmarks, addons, passwords etc.. are saved In your regular browser's profile folder hence when you lot launch browser manually, It volition purpose existing profile settings so
It volition demo you lot all those stuffs. But when you lot run your software spider web application's tests In selenium webdriver, It Is opening novel browser Instance amongst blank/new profile. So It volition non demo you lot bookmarks in addition to all those things In that browser Instance.
You tin practise custom firefox profile in addition to and then you lot tin purpose It In selenium webdriver test. In your custom profile, you lot tin gear upwards all required bookmarks, addons etc.. VIEW THIS EXAMPLE to know how to gear upwards custom profile of firefox browser.
37 : Arrange bellow given drivers In fastest to slowest sequence?
Firefox Driver, HtmlUnit Driver, Internet Explorer Driver.
Answer : HTMLUnit Driver Is faster than all other drivers because It Is non using whatever UI to execute attempt out cases of software spider web application. Internet Explorer driver Is slower than Firefox in addition to HtmlUnit driver. So, Fastest to slowest driver sequence Is every bit bellow.
- HtmlUnit Driver
- Firefox Driver
- Internet Explorer Driver
38 : What Is Ajax?
Answer : Asynchronous JavaScript in addition to XML Is total class of AJAX which Is used for creating dynamic spider web pages really fast for software spider web applications. Using ajax, We tin update page behind the scene past times exchanging pocket-size amounts of information amongst server asynchronously. That means, Using ajax nosotros tin update page information Without reloading page.
39 : How to handle Ajax In selenium WebDriver?
Answer : Generally nosotros are using Implicit wait In selenium WebDriver software automation tests to facial expression for roughly chemical cistron to last acquaint on page. But Ajax telephone telephone tin non last handled using solely Implicit facial expression In your attempt out because page non teach reloaded when ajax telephone telephone sent in addition to received from server in addition to nosotros tin non assume how much fourth dimension It volition accept to have ajax telephone telephone from server.
To possess got ajax telephone telephone In selenium WebDriver software automation tests, We needs to purpose webdriver's FluentWait method or Explicit Waits which tin facial expression for specific amount of fourth dimension amongst specific condition. You tin teach dissimilar Explicit Waits examples links on THIS PAGE.
40 : On Google search page, I wants to search for roughly words without clicking on Google Search button. Is It possible In WebDriver? How?
Answer : Yes nosotros tin practise It using WebDriver sendKeys method where nosotros practise non postulate to purpose Google Search button. Syntax Is every bit bellow.
driver.findElement(By.xpath("//input[@id='gbqfq']")).sendKeys("Search Syntax",Keys.ENTER);
In higher upwards syntax, //input[@id='gbqfq'] Is xPath of Google search text field. First It volition enter "Search Syntax" text In text box in addition to and then It volition press Enter cardinal on same text box to search for words on Google.