Published November 20, 2015 by

Selenium Frequently Asked Questions & Answers Part-4


Ques.76. What is a data driven framework?
Ans. A data driven framework is one in which the test data is put in external files like csv, excel etc separated from test logic written in test script files. The test data drives the test cases, i.e. the test methods run for each set of test data values. 


Ques.77. What is a keyword driven framework?
Ans. A keyword driven framework is one in which the actions are associated with keywords and kept in external files e.g. an action of launching a browser will be associated with keyword - launchBrowser(), action to write in a textbox with keyword - writeInTextBox(webElement, textToWrite) etc.
The code to perform the action based on a keyword specified in external file is implemented in the framework itself.

Read More
    email this
Published November 20, 2015 by

Selenium Frequently Asked Questions & Answers Part-3


Ques.51. How to verify tooltip text using selenium?
Ans. Webelements have an attribute of type 'title'. By fetching the value of 'title' attribute we can verify the tooltip text in selenium.


String toolTipText = element.getAttribute("title");

Ques.52. How to locate a link using its text in selenium?
Ans. Using linkText() and partialLinkText() we can locate a link.
The difference between the two is linkText matches the complete string passed as parameter to the link texts. Whereas partialLinkText matches the string parameter partially with the link texts.


WebElement link1 = driver.findElement(By.linkText(“pavantestingtools"));
WebElement link2 = driver.findElement(By.partialLinkText(“testingtools"));  

Read More
    email this
Published November 12, 2015 by

Selenium Frequently Asked Questions & Answers Part-2


Ques.26. How can we clear a text written in a textbox?
Ans. Using clear() method we can delete the text written in a textbox.


driver.findElement(By.id("elementLocator")).clear(); 

Ques.27. How to check a checkBox in selenium?

Ans. The same click() method used for clicking buttons or radio buttons can be used for checking checkbox as well.


Ques.28. How can we submit a form in selenium?
Ans. Using submit() method we can submit a form in selenium.


driver.findElement(By.id("form1")).submit(); 

Also, the click() method can be used for the same purpose.
Read More
    email this
Published November 12, 2015 by

Selenium Frequently Asked Questions & Answers Part-1





Ques.1. What is Selenium?
Ans. Selenium is a robust test automation suite that is used for automating web based applications. It supports multiple browsers, programming languages and platforms.

Ques.2. What are different forms of selenium?
Ans. Selenium comes in four forms-
Selenium WebDriver - Selenium WebDriver is used to automate web applications using browser's native methods.
Selenium IDE - A Firefox plugin that works on record and play back principle.
Selenium RC - Selenium Remote Control(RC) is officially deprecated by selenium and it used to work on javascript to automate the web applications.
Selenium Grid - Allows selenium tests to run in parallel across multiple machines.


Read More
    email this