How to attach Source Code in Eclipse Projects

We can take example of Java+Selenium projects. When we write scripts, often we need to look into the underlying implementation. For example, what are the methods available in WebDriver interface, what is the code for System.out.println etc. There are different ways how can we look into the code behind. Here I am going to explain …

Java Script Executor

Java Script Executor (JSE) is an interface available in the org.openqa.selenium package. This interface has two methods executeScript & executeAsyncScript. We can execute Java script codes using these two methods. Usually we use executeScript method. When there’s a delay in processing like webservice call, time outs then executeAsyncScript method is used. As the name indicates …

Make Excel Like a Database

Excel is the most commonly used data source used in test automation frameworks. I have come across one really interesting API that is called Fillo. It allows users to pass SQL queries and fetch data from excel. Add the below maven dependency in pom.xml <dependency> <groupId>com.codoid.products</groupId> <artifactId>fillo</artifactId> <version>1.21</version> </dependency> Refer the code below public class …

Chrome Developer Tools Tricks

How to open Developer tools in google chrome? Click on the chrome options -> More tools -> Developer tools Control+ Shift+I Right click on an element -> Inspect Press F12 How to inspect elements? Elements Panel – Use Functions in the Elements Panel Console Panel – Use Tokens in the console panel  $x(“some_xpath”) or $$(“css-selectors”) Console Options? Right …

Excel Tricks Testers Should Know

Excel sheets are most commonly used in test automation frameworks to provide input data. It is always better to modify the data in the excel sheet before supplying it to the test script instead of formatting the data in the automation script. 1. Add trailing spaces Let’s say we have a country drop down. It …

Java Coding Best Practices

1. Handle Null Pointer Exceptions Null pointer exceptions are quite common in Java and we need to handle it always. For example, if we are reading something from file and storing in a string variable. Then before performing any further action. Always check whether the value is null or not. Similarly check for Objects also. …

Design a site like this with WordPress.com
Get started