What is Selenium?
Selenium is a complete automation testing suites. Selenium is for web-based applications testing and it is useful to test web based application with different-different browser, Selenium has been one of the most accepted tools for automation testing. It is having facility to work with cross browser compatibility and having platform compatibility also. Selenium supports multiple languages like Java, C#, Python, Ruby etc.
Selenium components?
Selenium is having some components: Selenium IDE, RC (Remote Control), Web Driver and Grid.
Selenium IDE – It is record and playback tool. It records performed actions on web page
Selenium RC (Remote Control) – It allows to write web automation testing scripts and it acts to send test request to web browser.
Selenium Web Driver – Web Driver is web automation testing tool and faster than RC. It sends request directly to web browser.
Selenium Grid – It is used to distribute automation testing scripts on multiple platforms for execution.
Limitations of Selenium?
Selenium supports to test web based application.
Captcha code can’t be tested.
Need third party tool to generate test reports like TestNG.
What are the benefits of Automation Testing?
Advantages of Automation testing are:
Execution of repeated test cases
Test script can executed with parallel mode
It saves time and money
It reduces the human effort.
Selenium supports for what types of testing?
Functional Testing
Regression Testing
What is Selenese?
Selenese is a language and is used to create test script in Selenium IDE.
What is Locator in Selenium?
To find web elements on web page then selenium uses locators. So we can say it is like technique/command to know address of web element on web page.
Types of locators in Selenium?
Locators come with some types like:
id, name, class, Link Text, DOM, Xpath, CssSelecator.
For more info:- Please read post “selenium locators”.
Link:- http://qatestingtips.com/selenium-locators/
What is XPath?
Xpath is a locator and it is used to find web elements on web page and it is based on XML path.
Syntax can be like :- “ driver.findElement(By.xpath(“mention xpath value”);
Difference between single slash (/) and double slash (//) in Xpath?
Single Slash – It is used to create Xpath with absolute path and Xpath will be created to start selection from start node.
Double Slash – It is used to create Xpath with relative path and Xpath will be created to start selection from anywhere within the page.
Which locator is faster than Xpath?
CssSelector is faster than Xpath.
What is the difference between assert and verify commands?
Assert: This command is used to check given condition is true or false. It checks element is present or not on web page. If element is present on web page then next step will be execute else stop.
Verify: This command is used to check given condition is true or false. It checks element is present or not on web page. If element is not present on web page then it doesn’t stop for next step execution.
When to use Selenium Grid?
Selenium Grid is used to distribute automation testing scripts on multiple platforms for execution and whenever get requirement to run test scripts with multiple platforms then should be use.
What is Selenium 1 and Selenium 2?
Combination of Selenium RC and Web Driver is known as Selenium 2 and Selenium RC is know as Selenium 1.
What types of Drivers available in Web Driver?
Available drivers are:
Chrome Driver
Firefox Driver
Internet Explorer Driver
Safari Driver
Opera Driver
Android Driver
Html Unit Driver
What are available wait commands in Web Driver?
Implicit Wait
Explicit Wait
Implicit Wait: It is used to provide default waiting time between each test step across the complete script.
Syntax:- driver.manage().timeouts().implicitlywait(10, TimeUnit.SECONDS);
Explicit Wait: It is used to halt execution till a particular condition is met or the defined time is elapsed.
Syntax:- WebDriverWait wait = new WebDriverWait(WebDriverRefrence, Timeout);
It should look like in code:- WebDriverWait wait = new WebDriverWait(driver, 20);
How to send values in text box, select values from drop-down, click on element?
Please read post “Commands tips”
Link :- http://qatestingtips.com/commands-tips/
Navigation commands in Selenium?
driver.navigate().back();
driver.navigate().forward();
driver.navigate().refresh();
Difference between driver.close() and driver.quit()?
Driver.close:- It is used to close the web browser window on which user is working.
Driver.quit:- It is used to close all running windows.
How to handle windows based pop up in selenium?
Selenium supports only web application testing and because of this limitation it can’t handle alone but with some third party tool it is possible like AutoIT etc.
How to handle web-based pop up?
Please read post “Commands tips”
Link :- http://qatestingtips.com/commands-tips/
What is framework?
Framework is a combination of coding, concepts, processes, project hierarchies, reporting format, guidelines and more.
What is Junit and annotations of Junit?
Junit is based on Java and it is unit testing framework.
Junit Annotations: @Test, @Ignore, @Before, @After, @BeforeClass, @AfterClass
What is TestNG ?
TestNG means next generation and it is an advanced framework. TestNG is an open source framework and TestNG is used with Web Driver to provide a test result format and used for some other benefits also like parallel test scripts execution.
How to define test cases priority with TestNG?
@test (priority=0)
public void method(){
}
@test (priority=1)
public void method(){
}
@test (priority=2)
public void method(){
}
To know commands please visit:- “Commands Tips“