1, Can you tell me about yourself?


Hi, my name is xxx.

I started my Software Testing career {no of experience} years of experience in both manual and automated.

My job is to Understanding Business Requirements and Higher Conditions and to turn them into Automation test cases and scripts if needed. Performance testing and feature reporting cases to the developer if any and then corrected.

I have experience in Functional, Automation, Regression, Smoke, Sanity, Web accessibility, Web Analytics, Mobile Testing. In my previous project I worked on an Automation test where we used Selenium and Java framework and TestNG Cucumber for BDD method. We used a page object model where we separated our test cases with page elements, and did the same test. In the build management tool we use Maven to control the version using Git and to make our operations work each night any system we use Jenkins ,.

I am part of a 12-member team where we are 2-Tester, 2-dev, 1- manager, 1-scrum master.

2, Tell me your daily activities as a QA?


The first thing I do after signing in to my system. I am looking for a working sprint in Jira to get our project code. When I see my assigned assignments open. After that I will check my email if there are any important emails I need to pick up. After that we have our daily scrum meeting where we often tell our past actions what we did, what we plan for today and if we have anyone blocking us from talking about it. Product owner and scrum master help solve that block. After that I need to take a pending job and take the necessary action even if I create a case for testing, execution, Error Re-examination if any.

3, What is Difference between Implicit and Explicit waits?

Implicit wait:

Selenium will look at the element and wait for some time before a different cast. This applies to everything (all lines of code) throughout the text.

Syntax:

Driver.manage().timeouts().implicitlywait(10, timeUNIT.SECONDS);

Explicit Wait:

Sometimes we cannot judge the time it takes for a button to be enabled with a click. In such cases we can explicitly ask for selenium to wait for a specific condition.

Syntax:

WebDriverWait wait = new WebDriverWait(driver, 10);WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.id("someid")));


4, How Can You Manage Frames?


(If the tag name starts with "Frame" or "Frame" then the frame)

Syntax: driver.switchto (). Frame ();


The framework can be obtained in 3 ways:


1, driver.switchTo () frame (name_or_id)

If the frames tag has a different id or name, use it.


2, driver.switchTo (). Frame (index)

This is the last option you can choose, because using the index is not as stable as you can be. If this is the only iframe on the page,

trydriver.switchTo () frame (0)


3, driver.switchTo (). Frame (driver.findElement (By.className (“value”)));


The most common. Find your frame / frame like any other, and move it in the right direction.When you're done with the frame: you should exit the frame:

driver.switchTo (). defaultContent ();

5, Differences between windowsHandle and windowsHandles:


Let's say your test script opens 3 new tabs / windows: Selenium webdriver offers a different handle for each window. However, it can only find the Window Handle of the parent window using the "getWindowHandle ()" method. To get Window Handle for other windows we must use the "getWindowHandles ()" method which can restore the "Set" of wires. (Set a collection component in Java and the reason for using "Set" instead of "List" to handle mirrors are different values ​​and Set only allows for unique entry.) Then use "for each" loop iteration: we should measure it all object window handle and full inspection. Finally if we want to go back to the parent window: we can use its windowHandle that we saved earlier.

6, How will you handle drop rate?


Select s = new options (driver.findElement (By.id (“idval”)));

We can choose to descend in 3 ways:

1.Select by Value:

s.SelectByValue (“2”); => This will select the drop-down option when the value is set as “2” in the source code

2. Select by index:

s.SelectByindex (5); => This will select the drop down option on the fourth post. (Index starts with 0 so 5-1 = 4)

3. select by Visible Text:

s.SelectByVisibleText (“someText”); => This will select the drop-down option and the text “someText” text.


7, Did you create a draft from the beginning, or did you keep that?


I did not create a framework in my beginning but yes, I was part of the framework of the framework and I formed part of it.


8, How much do you rate in Java 10?

At 10 I will average myself 6 in java as a QA Automation engineer.

9,Can you tell me Oops concepts and relate it with your Framework?


We have Polymorphism, Inheritance, Encapsulation and Abstraction in Oops. So, we will start with


DATA ABSTRACTION : 

Data Abstraction means to handle complexity by hiding unnecessary details from the user. In java, abstraction is achieved by interfaces and abstract classes. We can achieve 100% abstraction using interfaces. In Selenium, WebDriver itself acts as an interface. Consider the below statement: WebDriver driver = new ChromeDriver(); We initialize the Chrome Browser using Selenium Webdriver. It means we are creating a reference variable (driver) of the interface (WebDriver) and creating an Object. Here WebDriver is an Interface and ChromeDriver is a class. We can apply Data Abstraction in a Selenium framework by using the Page Object Model design pattern. We define all our locators and their methods in the page class. We can use these locators in our tests but we cannot see the implementation of their underlying methods. So we only show the locators in the tests but hide the implementation. This is a simple example of how we can use Data Abstraction in our Automation Framework.


ENCAPSULATION :

Encapsulation is defined as the wrapping up of data under a single unit. It is the mechanism that binds together code and the data it manipulates. Encapsulation can be achieved by: Declaring all the variables in the class as private and writing public methods in the class to set and get the values of variables. All the classes in an Automation Framework are an example of Encapsulation. In Page Object Model classes, we declare the data members using @FindBy and initialization of data members will be done using Constructor to utilize those in methods.


INHERITANCE : 

Inheritance is the mechanism in java by which one class is allowed to inherit the features (fields and methods) of another class. We can apply Inheritance in our Automation Framework by creating a Base Class to initialize the WebDriver interface, browsers, waits, reports, logging, etc. and then we can extend this Base Class and its methods in other classes like Tests or Utilities. This is a simple example of how we can apply Inheritance in our framework.


POLYMORPHISM :

Polymorphism allows us to perform a single action in different ways. In Java polymorphism can be achieved by two ways: – Method Overloading: When there are multiple methods with same name but different parameters then these methods are said to be overloaded. Methods can be overloaded by change in number of arguments or/and change in type of arguments. In Selenium Automation, Implicit wait is an example of Method Overloading. In Implicit wait we use different time stamps such as SECONDS, MINUTES, HOURS etc. – Method Overriding: It occurs when a derived class has a definition for one of the member functions of the base class. That base function is said to be overridden. In Selenium Automation, Method Overriding can be achieved by overriding any WebDriver method. For example, we can override the findElement method In assertion we have used overload because in assertion we used to like asset.true(actual, expected) and second time we can use same assert.true(actual, expected, message).

10, How can you use interface and how it is different from Abstract class?


Abstract class may have Abstract and concrete methods, and there is not any compulsion in adding abstract method in abstract class. But in Interface, we do have only abstract methods and we don’t need to write abstract keyword in Interface this is by default public and abstract.


11,What do you mean by Static keyword in Java?

Static means it is at class level not at instance level, we have static method, static variable & static inner class. When we have any variable as static so it will remain same for all the instance of our classes, and static/Private/Final methods can’t be over-ridden like if we have initialized any method as Static so we cannot override it in any child class.


12,How will you select the last option in the dropdown?

s.getOptions(); => This will return me the total number of options. Then using the select by index we can select the desired option.

13,Without using “select” how will you select drop down value?


Using Actions class we can do that. Identify the element. Using the click method of Actions class click the dropdown and then click down arrows using the method sendKeys(keys.Down) and then click the desired element.

14,Advantages of Framework:


1. Pre-Built and readily available.

2. Code reusability and no need to write again.

Types of Framework:

1. Modular : Follows an ordered folder structure

2. Data Driven : The scripts uses data from Data files like excel and validate input & output.

3. Keyword Driven : The scripts uses wrapper methods + excel read/write

4. Hybrid : Combination of all the above


15,What is the type of framework you are using? are Explain your framework?


Hybrid with TestNG

Components in a framework:

1. Input: (This will contain my driver + scheduler to invoke the scripts)

2. Resources: (This will contain the scripts, jar files, driver files and other essential things required

for execution).

3. Output: (This will contain the reporter (TestNG + Excel based reporter to store the results/screenshots).

Folder Structure of my Framework:

1 Data Test Data

2 bin All my .class files

3 library Jar files (selenium, Apache etc)

4 Src Scripts

5 Driver Driver.exe of diff. Browsers

6 Result Results+Reports+Snapshots

7 Config configuration details

8 Help Help/supporting doc

Working / Flow of Framework:

1. The driver file is called manually. Also Windows scheduler provides option to run the driver via batch file on a particular date and time.

Note: The same can also be achieved by configuring Jenkins/Git/Maven. When a new Build is deployed in Jenkins, it will get reflected in Git (A cloud based tool) and it will trigger the Maven to run driver file.

2. The batch file by using the design will call the TestNG xml file using the code “java –cporg.testng.testNGXMLfilename.Xml”.

3. The XML file using the design will invoke the TestNG classes (scripts) as RemoteWebdriver scripts and send them to the Hub.

4. The Hub checks the desired capabilities and based on the actual capabilities of the nodes will send the scripts to them and execute on them.

5. The results of execution will be stored in Results folder. We use both the TestNG default test results (HTML format) + our own customized excel based reporting.


14,What do you mean by wrapper class and how will you do data conversion?

Wrapper class in java are used for data conversion. In data conversion if user wants to convert Int to string, String to int, Boolean, double then we use Wrapper class. integer.parseInt(); - To convert string to Integer Double.parseDouble(); - To convert string to Double Boolean.parse Boolean(); - To convert string to Boolean String.valueof(); - To convert Integer to String.


15,What do you mean by Call by Value & Call by Reference in Java?


Call by value means suppose we have created one sum method with input parameter int a, int b. So while calling the creating the object and running we provide values that is know as call by value.

16,Can you tell me about difference between Throw and Throws keyword?


Throw is a keyword used inside a body of function. And Throws used while initializing any method. By using Throw we can throw only one exception while for Throws we can declare multiple exceptions which might occur in that particular function. Throws keyword followed by instance name and Throw keyword is followed by class name of that exception.

17, How much you rate yourself in selenium out of 5?


Out of 5 I will rate myself 3.5 in selenium.

18, Which locator you are using in your framework and why?


Mostly we used ID and Xpath because Id is the fastest and unique one and after that we prefer Xpath. Anyways we have other locators as well like css , class name, tag name, Link text, Partial Link text.

19,What is the difference between findelement & findelements?


findelement will give the first appearance of that element which matches our locator, whereas findelements will give us list of all the elements which is present over the webpage and matching our locator. And if we don’t find the element findelement will give us nosuchelementexception whereas findelements will return NULL/Empty list.

20, Can you tell me how you will handle multiple window in selenium.?


We have windowhandle & windowhandles function for handling Multiple windows. Windowhandle will give the string value of only the active window that is open whereas windowhandles will give set of all the windows that are open in browser.


Conclusion:

Hi Friends once completed the First Part , Kindly continue the Second Part .Happy Learning.....



Post a Comment

Previous Post Next Post