Automation

  Home  Testing  Automation


“Automation related Frequently Asked Questions by expert members with professional career as Automation. These list of interview questions and answers will help you strengthen your technical skills, prepare for the new job interview and quickly revise your concepts”



108 Automation Questions And Answers

81⟩ Explain me how can we capture screenshots in Selenium?

We can take the screenshots in selenium by using getScreenshotAs method of TakesScreenshot interface:

File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);

FileUtils.copyFile(scrFile, new File("C:screenshot1.jpg"));

 140 views

83⟩ Please explain what is the hybrid framework?

The combination of data driven and keyword driven framework is called the hybrid. Here the operations/instructions/keywords in a separate repository (.csv/.xls/.json/DB) and data is in separate (.csv/.xls/.json/db from data provider) and the tests/driver would read both and perform the actual tests automatically. In this design, we get the best of both methodologies, and it is kind of practical in most of the automation cases.

 198 views

84⟩ Tell us how do you get the width of the textbox?

You can get the width of the textbox by using the following command:

driver.findElement(By.xpath(“xpath of textbox ”)).getSize().getWidth();

driver.findElement(By.xpath(“xpath of textbox ”)).getSize().getHeight()

 149 views

88⟩ Tell me what is a keyword-driven framework?

The keyword driven framework is a methodology where actions or steps are treated as keywords. These keywords (like click, move, type etc.,) are stored in some external repositories along just like data (in .csv/.json/.xls/DB).

 144 views

89⟩ Tell me how could AJAX controls be handled in WebDriver?

AJAX allows the Web page to retrieve small amounts of data from the server without reloading the entire page.

The different wait methods should be applied for testing Ajax application:

☛ ThreadSleep

☛ Implicit Wait

☛ Explicit Wait

☛ WebdriverWait

☛ Fluent Wait

 131 views

91⟩ Tell me how can the user get a text of a web element?

User can retrieve the text of the specified web element by using get command. It doesn’t require any parameter but returns a string value.

String Text = driver.findElement(By.id(“Some Text”)).getText()

is an example of it.

 145 views