Selenium Advanced Questions

manual testing

Selenium Advanced Questions

Below is the list of most frequently asked selenium interview questions. The list contains Selenium Advanced Questions which will be very helpful for your next interview.

1- What is a framework? Explain types of framework.

2- Which framework you have used and why?

3- Explain framework, with components.

4- What is the role of automation in your project?

5- What are the advantages of the Framework/ benefits of a framework?


  • Reusable components like object repo, generic lib, test data

  • Test development is faster and execution is easier

  • Maintenance of test data is easier

  • Code optimization

  • Modification of xapth is easier, because of POM

  • Cross-browser testing is easier

  • Customize reports

  • Listener concept is available to take a screenshot

  • Running the test with other credential is easier by changing username/ password

  • Maven dependencies will take care of getting all jars from the internet

  • Jenkins provide remote execution

6- What is POM design pattern? Explain POM design pattern rules.

7- How many page class you created?

8- How many modules you worked on?

9- What is the advantages of POM object repository?


  • Maintenance of xpath is easier
  • Reusability of web element
  • Business libraries will optimize the test development
  • Avoid duplicate locators
  • Well organized design technique maintained in Page level

10- Write a Program to store object in POM and explain how to access an object from POM.

11- Write a Program to read the data from Excel.

12- What is data-driven testing?

13- How to achieve data-driven testing?

Answer: Apache POI

14- Why do you get the data from Excel why not Data Base or other File?

Answer: Excel is userfriendly

15- How to run the same test with multiple test data?

Answer: @data provider

16- Where do you use Polymorphism in your framework?

Answer: Explain Base class to launch the browser

17- Where do you use Upcasting in your framework?

Answer: Webdriver driver = new FirefoxDriver

18- Where do we use inheritance in selenium framework?

Answer: Class test extends Base{…

19- Where do we use Abstraction in selenium framework

Answer: Class ListnerImp implements ItestListner{….

20- Where do we use Encapsulation in selenium framework

Answer: POM Classes

21- Where do we use Overriding in selenium framework?


Class SampleListner implements ItestListner{ Public void ontestFailure(){

Take screenshot }


22- Where do we use OverLoading in selenium framework


Class CrteateContact extends baseConfigClass{ createConatct(String firstNAme, String lastNAme){

createConatct(String firstNAme, String lastNAme, String addres){

} }

23- Why your framework is hybrid, why not other frameworks?

Because my project is having many modules which also required test data to test the scenarios

24-What is your role in selenium framework/contribution in the framework?


  • Few page class we implemented
  • I have implemented Extend Reporting in my framework
  • I have implemented a few generic methods like waitforPageToLoad, waitForElement
  • Implemented Report back-Up facilities

25- What your accomplishment

26- Without a framework, what are the challenges?

27- What suggestion you give your FrameWork

28- List Selenium Excpecption you faced in Real-Time.



StaleElement excelption


IllegalState Exception




30- What is TestNG, why it is required?


Unit testing framework tool, used for grouping, parallel execution, Assertion, HTML report

31 – Without TestNG, what all the challenges you faced?

32- Why TestNG, Why not JUNIT?


Additional annotation

HTML reporting



Support both java and .net

Parallel execution

33- What is the use of @beforeSuite , @afterSuite in testing?

@beforeSuite will be executed only once in entire suite execution before the start.
Real-Time usage: In Our Project, we have used Extent Report tool to customize the report, in order to configure custom report we have @beforeSuite annotation

@AfterSuite will  execute only once in entire suite execution

Real-Time usage : to close connection of extent report and to get the execution report backup.

34- Explain the hierarchy of testNG annotation







35- What is batch execution and how to achieve batch execution?

Collection of multiple tests is called a batch, executed through testing.xml

36- Write Syntax of Xml

37- What is grouping execution and how to achieve group execution?

38- What is parallel execution and how to achieve parallel execution?

39- How to achieve CROSS browser testing using Selenium?

40- How to disable the testing test scripts

Answer: @test(enabled=false)

41- How to execute the same test with multiple times

Answer: @test(invocation count= 10)

42- What is an assertion and how many assertions you used in real-time selenium test scripts, explain with real-time examples.

43- What is @parameter annotation in TestNG, how to send parameter to testNG test?

44- How to execute the same test with multiple data

Answer: @dataprrovider

45- What is the @Listner annotation in TestNG?

46- Difference between testNG-Listner & webdriver Listener

47- How to execute only failed test cases?


  • After the batch execution “refresh the folder”
  • automatically we get testing-falied.xml (inside test-output),
  • just run that XML file

48- How to execute dependent test-Scripts?

49- Whenever we get build which test-scripts, you will execute first?


Using the grouping concept, we will execute the smoke test first.

50- What is the role of selenium in your Project?

51- How many modules you are allocated?

52- What you do every day in the office?

53- How many test cases you can write/month?

54- How many test case you have written in your last project?

55- What processes you followed in your last project?

56- How many build you got in one release?

57- How many releases you got in the last project?

58- How many bugs, you found in automation?

59- Write an automation code for the login page for any application.

60- When we run 100 test scripts, few test scripts got failed, then what will be your first approach?

61- When we run 100 test scripts, all test scripts got failed, then what would be the issues?

62- What is your roles & responsibility in your last project?

63- When you will start automation?

64- What is not automatable in your last project?

65- What are the challenges of automation?

66- What automation process followed in your company?

67- What is the entry & exit criteria of the automation?

68- Why automation? explain the role of automation in regression testing.

69- Set of manual test cases is given to you, then what will be your first step?

70- What is GitHub?

71- What is the role of GitHub in automation?

72-  What is the advantages of GitHub?

73-  What is Maven?

74- What is the role of maven framework?

75- What are dependencies, how to handle dependencies in the framework?

76- What is Project Object Model [POM .XML]?

77- Explain the maven plugins you used in your framework.

78- How to execute TestNG.xml in maven?

79- What is Jenkins?

80- What is the role of Jenkins in Framework?

81- What are the advantages of Jenkins?

82- How to configure Jenkins?

83- Difference between xpath & css-selector.

84- How to execute Java-scripts in Selenium?

85- How to work with the browser scroll bar.

86- How to handle SSL popup?

87- Non-automatable test case in your project?

88- Explain the Selenium Architecture

89- Difference between Selenium-IDE & Selenium RC.

90- Difference between quit() & close().

91- How to maximize & minimize the browser?

92- What is webdriver “interface” or “Class”?

93- What is the Super interface for WebDriver?

94- How many locators are available in Webdriver and which locator is preferred?

95- How to check whether the object is available in GUI?

96- How to check the text from the UI?

97- How to capture the color, height, width, font size of the element?

98- How to get the location of the Web element?

99- How to delete all cookies?

The above list contains Selenium Advanced Questions.

For more interview question visit ALLSTQ

Wikipedia Selenium

1 thought on “Selenium Advanced Questions”

  1. Pingback: Google

Comments are closed.