Automation Testing Interview Questions For 5 Years Experience Selenium

Are you preparing for a Selenium interview? If so, you’ll want to be sure to brush up on your Selenium interview questions.

In this blog post, we’ll provide you with a list of Selenium interview questions that are likely to come up in an interview setting. We’ll also provide tips on how to answer these questions.

2) What is Selenium 0?

Web Testing tools Selenium RC and WebDriver are consolidated in single tool in Selenium 2.0

automation testing interview questions for 5 years experience selenium

1 Why do testers choose Selenium over QTP?

Selenium is more widely used than QTP since:

  • Selenium is an open-source tool, whereas QTP is a profitable tool
  • Selenium is used specifically for testing web-based applications, while QTP can be used for testing client–server applications too
  • Selenium supports multiple browsers like Firefox, IE, Opera, Safari, etc. and has multiple operating systems compatibility too. Selenium-supported OS platforms are Windows, Mac, Linux, etc. On the other hand, QTP is limited to Internet Explorer on Windows
  • Selenium supports multi-programming language compatibility. Languages supported by Selenium are Python, Ruby, Perl, etc. But, QTP supports only VBScript
  • You can find more on Selenium by visiting our Selenium Community!

    2 How to send ALT/SHIFT/CONTROL key in Selenium WebDriver?

    When we generally use ALT/SHIFT/CONTROL keys, we hold onto those keys and click other buttons to achieve the special functionality. So it is not enough just to specify keys.ALT or keys.SHIFT or keys.CONTROL functions.

    For the purpose of holding onto these keys while subsequent keys are pressed, we need to define two more methods: keyDown(modifier_key) and keyUp(modifier_key)

    Parameters: Modifier_key (keys.ALT or Keys.SHIFT or Keys.CONTROL) Purpose: Performs a modifier key press and does not release the modifier key. Subsequent interactions may assume it’s kept pressed.

    Parameters: Modifier_key (keys.ALT or Keys.SHIFT or Keys.CONTROL) Purpose: Performs a key release. Hence with a combination of these two methods, we can capture the special function of a particular key.

    1 How can you launch a browser using Selenium WebDriver?

    The following syntax is used to launch a browser using Selenium WebDriver:

  • WebDriver driver = new InternetExplorerDriver();
  • WebDriver driver = new ChromeDriver();
  • WebDriver driver = new FirefoxDriver();
  • TestNG Interview Questions:

    Here we have dealt with some important TestNG interview questions. If you want to learn more interview questions related to TestNG then here you go. We have a special post on TestNG Interview Questions. Also, you could find TestNG Complete Tutorial here

    13 Where you have applied OOPS in Automation Framework?

    Here we have given a clear explanation of the application of OOPs in Automation Framework

    12 What is Parameterized testing in TestNG?

    Parameterized tests allow developers to run the same test over and over again using different values.

    There are two ways to set these parameters:

  • with testng.xml - Practical Example
  • with Data Providers – Practical Example
  • 3 How to skip a method or a code block in TestNG?

    If you want to skip a particular test method, then you can set the ‘enabled’ parameter in test annotation to false. @Test(enabled = false)

    By default, the value of ‘enabled’ parameter will be true. Hence it is not necessary to define the annotation as true while defining it.

    17) What is the difference between setSpeed() and sleep() methods?

    Both will delay the speed of execution.

    It will stop the current (java) thread for the specified period of time. Its done only once

  • It takes a single argument in integer format
  • Ex: thread.sleep(2000)- It will wait for 2 seconds

  • It waits only once at the command given at sleep
  • For specific amount of time it will stop the execution for every selenium command.

  • It takes a single argument in integer format
  • Ex: selenium.setSpeed(“2000”)- It will wait for 2 seconds

  • Runs each command after setSpeed delay by the number of milliseconds mentioned in set Speed
  • This command is useful for demonstration purpose or if you are using a slow web application

    Testing Mock interview – 5+ Years of Experience – Test Automation

    Related Posts

    Leave a Reply

    Your email address will not be published. Required fields are marked *