Automation

Selenium Interview Questions

Automation
Q1. What are the annotations used in TestNG ? Ans - @Test, @Before Suite, @After Suite, @Before Test, @After Test, @Before Class, @After Class, @Before Method, @After Method. Q2. How do you read data from excel ? Ans - FileInputStream fis = new FileInputStream(“path of excel file”); Workbook wb = WorkbookFactory.create(fis); Sheet s = wb.getSheet(“sheetName”); String value = s.getRow(rowNum).getCell(cellNum).getStringCellValue();   Q3. What is the use of xpath? Ans - it is used to find the WebElement in web page. It is very useful to identify the dynamic web elements. Q4. What are different types of locators ? Ans-  There are 8 types of locators and all are the static methods of the By class. By.id(), By.name(), By.tagName(), By.className(), By.linkText(), By.par

SoapUI interview Questions

Automation
SOAP UI INTERVIEW QUESTIONS SET-1 Question: 1 Explain what is SOAP UI? Answer: SOAP UI is a free, open source cross-platform functional testing solution. It enables you to rapidly and easily create and execute automated regression, compliance, functional and load tests. Question: 2 What are webservices? Answer: Web services are web components that transfer data between client and server. Client sends a web request to the server and the server then responds to client. The response and request are related and different requests evoke the corresponding response. Web Service is a web component or software program that can be accessed on the Internet. It is mainly used to communicate with the web based applications through XML messaging concepts. For example, if we want to ac...

Selenium Introduction

Automation, Level1, Selenium, Uncategorised
Selenium Introduction: What is Automation Testing Benefits of Automation Testing When to automate an application: Steps to follow in Automation testing: Disadvantages of Automation Testing Different Automated Web Testing Tools Selenium Introduction Selenium Pros Selenium Cons Differences between selenium and other Tools What is Automation Testing? The Process of converting Manual Test cases into Test Script by using any automation tool is known as Automation Testing. Testers write test scripts and test cases using the automation tool and then group those test cases into test suites. Benefits of Automation Testing Reliable: Tests perform precisely the same operations each time they are run, thereby eliminating human error Repeatable: You can...

Web Table With Selenium

Automation, Level6
Handling Web Tables in Selenium WebDriver Step By Step Process Of Determining XPath For A Cell In The Web Table How To Access Nested Tables In Selenium WebDriver How To Handle Dynamic Tables In Selenium WebDriver Web tables are most often used to represent information on a web page. And Software testers can use Selenium WebDriver for accessing tables and reading data at runtime.  In this post, I will explain you multiple ways for handling Web tables in WebDriver. I will cover static tables, nested tables, and dynamic tables so that you can understand the concept thoroughly. To help you out, I have added code examples for each method given here to handle the web tables. So that you can start practicing them even while you are reading this post. But apart
Open Browser in Selenium

Open Browser in Selenium

Automation, Level1, Selenium
Opening a browser with binary File: There will be situations, where you have to test your web application against two different versions of the  browser. For example consider FireFox, By default, when you create object to FirefoxDriver, the Firefox version that is available on the PATH variable is launched. But if you want to launch a different version of Firefox, we need to use Firefox Binary, or if the browser is not in the standard PATH then you should specify the browser binary file location to open the browser. public static void main(String[] args) { File pathToBinary = new File("C:\\PATH\\App\\Firefox\\firefox.exe"); FirefoxBinary firefoxBinary = new FirefoxBinary(pathToBinary); FirefoxProfile firefoxProfile = new FirefoxProfile(); WebDriver driver = new Firefo
WebElement Actions

WebElement Actions

Automation, Level1, Selenium
In this selenium tutorial , we will learn all the different user actions that can be performed on an WebElement. Different WebElements will have different actions that can be taken on them. For example, in a textbar element, we can type in some text or clear the text that is already typed in it. Similarly for a button, we can click on it, get the dimensions of it, and position of it on the webpage, but we cannot type into a button, and for a link, we cannot type into it. All the actions are present as method in WebElement interface in selenium webdriver. In case we try to execute a wrong action on a WebElement, we don’t see any exception or error thrown and also we don’t see any action that really gets executed; WebDriver ignores such actions. The getAttribute() method The ge

What should be automated ?

Automation, Level1, Selenium
It's bee traditional thinking to... One to one mapping between manual tests and automated tests. Trying to have as much requirements and test case coverage as possible. Automated tests should be able be reproducible manually. But over the years, I've found that having 1000's of test cases I tend to cause even more problems. 1. Test code is harder to maintain which becomes production code. Besides the technical aspects like having to bend over backwards to accommodate changes in the software under test, it is also the lack of support from business and development for test code. For example, very few shops will hold up a release or delay development if there are broken tests or flaky tests.  The default is generally to comment those tests out..