Sunday, 2 April 2017

Selenium Interview Questions Answers for Freshers

1.What is WebDriver?
A) Class        B) Interface    C) Method    D) None of the Above
 
2.tagname() locator used to identify.......
A) Element    B) Multiple Elements    C) HTML tag    D) None of the Above
 
3.What is the use of content Equals () ?
A) Compare strings    B) Compare files    
C) Compare elements    D) None of the Above
 
4.What is the method to enter data into textbox
A) get Text()    B) get PageSource()    
C) get Attribute()    D) None of the Above

5.What is the syntax to create xpath()
A) //tagname[@attribute="value" ]
B) //tagname[attribute=value]
C) //tagname[@attribute='value']
D) //tagname[@attribute,'value']

6.Actions class used to handle______
A) Mouse Operations    B) Keyboard Operations
C) Mouse & Keyboard Operations    D) Web Application Operations

7.What is TestNG?
A) Test Next Generation        B) Class       
C) Unit Testing Framework    D) Test Automation Framework

8.What is the Function to handle Dynamic xpath elements
A) starts-with()        B) xpath()    C) equals()    D) None of the Above

9.What is the use of xml file in TestNG?
A) Class execution    B) suite execution    
C) method execution    D) None of the Above

10.What is POM?
A) Project Object Model        B) Page Object Model       
C) Design Pattern Model    D) Automation Framework

11.What is the Class to execute Page Objects in POM?
A) WebDriver        B) Remote WebDriver
C) Page Factory        D)@FindBy

12.What is the use of AutoIT?
A) Handle web elements    B) Handle window elements
C) Handle mouse & keyboard Operations    D) Handle buttons

13.How Hub will connect to the nodes in selenium Grid?
A) WebDriver     B) swithTo()    
C) DesiredCapabilities    D) RemoteWebDriver

14.How would you check if any element is visible in the web page?
A) isEnabled()        B)isSelected()
C) isDisplayed()        D) click()

15.When to go for Automation Testing?
A) After completion of all Test Cases
B) After retesting and regression testing
C) When the Application is stable
D) After getting all requirements

16.What is the use of TestNG?
A) Screen shots        B) HTML Results
C) mouse & keyboard operations    D) None of the Above

17.What is the method to click OK button in alerts
A) click()    B) doubleClick()        C) accept()    D) Alert()

18.How to handle hidden links in webpage?
A) Actions    B) JavaScriptFunctions    C) JavaScriptExecutor    D) AutoIT

19.How do you verify an Object Present on Webpage?
A) equals()    B) getText()    C) assertTrue()        D) contentEquals()

20.What is the method to handle multiple popups in webpage?
A) Alert()        B) swithTo()    C)getWindowHandle()        D) None of the Above

Keypaper Publish Soon..