Aspire – Selenium Interview Questions
Here is the list of Selenium Interview Questions which are recently asked in Aspire company. These questions are included for both Freshers and Experienced professionals. Our Selenium Training has Answered all the below Questions.
1. What are the activities you are doing in your project?
Understanding the requirements of features to be automated and getting it in automation roadmap
Monitor daily executed automation script result
Raise defect or fix script based on failure analysis
Understanding best practices in automation
Identify code optimization area to make execution faster
2. Which frame work you are using?
Using Maven for build, execution, and dependency purpose. Integrating the TestNG dependency in the POM.xml file and running this POM.xml file using Jenkins.
3. Tell me about the traceability matrix?
Traceability matrix or software testing traceability matrix is a document that traces and maps the relationship between two baseline documents. This includes one with the requirement specifications and another one with the test cases.
4. Recursive functionality possible using Selenium IDE ?
A recursion is the attribute that allows the method to call itself. A method that calls itself is said to be recursive method. The classic example of recursion is the computation of factorial of a number. Examples:
Factorial of 3 is 3*2*1 = 6
Factorial of 6 is 6*5*4*3*2*1 = 720
Method calling itself for returning the factorial of a number:
int fact(int n)
{
int result;
if(n==1)
return 1;
result = fact(n-1)*n;
return result;
}
5. SOAP UI – Could a output response obtained from one XML can be used as input for invoking other XML?
6. Write test cases for a scenario – eg.entering address
- Full Name
- Mobile Number
- Pincode Flat/House No/Floor
- Street/Locality
- Landmark
- City
- State
- Country
7. Framework – type/flow/structure?
Since they are often built, tested, and optimized by several experienced software engineers and programmers, software frameworks are versatile, robust, and efficient.
Using a software framework to develop applications lets you focus on the high-level functionality of the application. This is because any low-level functionality is taken care of by the framework itself.
- Linear Automation Framework.
- Modular Based Testing Framework.
- Library Architecture Testing Framework.
- Data-Driven Framework.
- Keyword-Driven Framework.
- Hybrid Testing Framework.
8. Relative xpath – 3 nodes with same id value , 3rd node having additional character “xyz” – how to find relative xpath for the 3rd node?
Use the below code:
//Element[@attribute1="abc" and @attribute2="xyz" and text()="Data"]
9. SQL – Inner join related query
Example:
SELECT Orders.OrderID, Customers.CustomerName, Orders.OrderDate
FROM Orders
INNER JOIN Customers ON Orders.CustomerID=Customers.CustomerID;
10. How to get the title of the page?
method getTitle() is used to get the title of the page.
11. Which is the package which is to be imported while working with WebDriver?
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import java.util.concurrent.TimeUnit;
import java.util.List;
public class FrameCount{
public static void main(String[] args) {
System.setProperty("webdriver.chrome.driver", "C:\\Users\\ghs6kor\\Desktop\\Java\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
String url =
"http://the-internet.herokuapp.com/nested_frames";
driver.get(url);
driver.manage().timeouts().implicitlyWait(12, TimeUnit.SECONDS);
//By finding list of the web elements using frame or iframe tag
List f = driver.findElements(By.tagName("frame"));
System.out.println("Total number " + f.size());
driver.quit();
}
}
12. How to hover the mouse on an element?
Actions act = new Actions(driver);
act.moveToElement(webelement); //webelement on which you want to move cursor
13. Can Selenium handle windows based pop up?
Selenium can handle Windows based pop up getWindowHandles () and getWindowHandle ()
Free PDF : Get our updated Selenium Course Content pdf
14. Structure of the framework?
A Test Automation Framework is a set of guidelines like coding standards, test-data handling, object repository treatment etc... which when followed during automation scripting produces beneficial outcomes like increased code re-usage, higher portability, reduced script maintenance cost etc.
15. Where to keep your script files?
BehavioWhere you put your script depends on who the intended user is. If it is just you, put it in ~/bin and make sure ~/bin is in your PATH. If any user on the system should be able to run the script, put it in /usr/local/bin.r Driven Development approach used to selenium.
16. What approach you are using for selenium ?
Behavior Driven Development approach used to selenium.
17. Can we do file upload thru selenium?
Uploading files in WebDriver is done by simply using the sendKeys() method
18. Can we able to locate excel file in a system thru selenium?
When you download the zip file for this jar, you need to unzip it and add these all jars to the class path of your project.
19. What is test plan & test strategy?
Test Plan | Test Strategy |
---|---|
Test plan narrates about the specification | Test strategy narrates about the general approaches |
Test planning is done to determine possible issues and dependencies in order to identify the risks. | It is a long-term plan of action.You can abstract information that is not project specific and put it into test approach |
Test plan can change | Test strategy cannot be changed |
20. Tomorrow your project delivery.Today your onsite co-ordinator saying that you missed one functionality?Then what will be your reply to him and your manager?
21. Write a program to reverse a number(eg. 1234 to 4321) without using modulus operator.
// Java program to reverse a number
class GFG {
/* Iterative function to reverse
digits of num*/
static int reversDigits(int num)
{
int rev_num = 0;
while (num > 0) {
rev_num = rev_num * 10 + num % 10;
num = num / 10;
}
return rev_num;
}
// Driver code
public static void main(String[] args)
{
int num = 4562;
System.out.println("Reverse of no. is "
+ reversDigits(num));
}
}
22. From the below diagram find the sum greater value of the side and print that.
23. What are the languages supported by WebDriver?
- Java
- JC#
- JRuby
- JPython
- JJavascript
- JPerl
- JPHP
- JEtc.,
24. What is a Framework?
A framework, or software framework, is a platform that provides a foundation for developing software applications. Think of it as a template of a working program that can be selectively modified by adding code.
It uses shared resources – such as libraries, image files, and reference documents – and puts them together in one package. That package can be modified to suit the specific needs of the project. With a framework, the developer can add or replace features to give a new functionality to the application
25. How to invoke an application in WebDriver?
Chrome browser implements the WebDriver protocol using an executable called ChromeDriver.exe. This executable start a server on your system which in turn is responsible for running your test scripts in Selenium.
26. What is Selenium Grid?
Selenium Grid is a part of the Selenium Suite that specializes in running multiple tests across different browsers, operating systems, and machines in parallel. It is achieved by routing the commands of remote browser instances where a server acts as a hub. A user needs to configure the remote server in order to execute the tests.
27. How to get the title of the page?
Use getTitle() method.
Syntax:
Syntax- driver.getTitle();
Book a Free Mock Interviews and Test your Selenium skills with our Experts
TOP MNC's SELENIUM INTERVIEW QUESTIONS & ANSWERS
Here we listed all Selenium Interview Questions and Answers which are asked in Top MNCs. Periodically we update this page with recently asked Questions, please do visit our page often and be updated in Selenium.
Related Blogs
To become a Selenium Certified professional and join in your dream company, Enroll now for our Best Selenium Training. We help you to crack any levels of Selenium Interviews and We offering Selenium Training with Placement Assistance.