Selenium Topics – Page 20 – Make Selenium Easy

Hello Folks, We talked about TestNG class in previous post. Can we declare and define TestNG annotated methods in an Interface? We will learn now. As per Java 8, An interface can have abstract methods, default methods and static methods. Let’s create an Interface with TestNG annotated abstract methods and observe what happens: An interface … Continue reading TestNG Tutorials 13: Can An Interface have TestNG Methods? If Yes, How To Execute Them?

Hello Folks, In this post, we are going to learn to generate customized testng.xml. Generation of testng.xml depends upon how you create it. We will see some scenarios in this post. Scenario 1: Generating testng.xml for an individual class.  We will take same example of previous post: You need to select individual class and do … Continue reading TestNG Tutorials 7: How To Create Customized TestNG XML?

Hello Folks, In last post, we ran our testng class as a TestNG test using “Run As” option. We can run it using testng.xml which we will learn in this post. After creating testng class, we need to generate a testng.xml which is very easy. We will take same example of previous post: Right click … Continue reading TestNG Tutorials 6: How To Create and Run TestNG XML Of TestNG Class

Hello Folks, In this post, we will see some basics implementation of TestNG. A class is called TestNG class if it has annotations provided by TestNG. TestNG provides an annotation called “Test” which you need to use for any method which has some business logic to verify. When you add this “Test” annotation, you DON’T … Continue reading TestNG Tutorials 5: How To Create And Run A TestNG Class

Hello Folks, You might be asked in selenium interviews, “Why TestNG is called a testing framework?”. Why TestNg is called “Testing Framework”? TestNG, where NG stands for “Next Generation”. TestNG is a testing framework to perform unit, functional, end-to-end, integration, etc testing. This library helps you in writing automated tests. Suppose, you are launching a URL … Continue reading TestNG Tutorials 4: Why TestNG Is Called A Testing Framework?

Hello Folks, In last Post, we have seen how can we directly download and use TestNG. We will see another two ways in this post. Using Eclipse Market Place Option: Steps to be followed: Steps 1: Navigate to Help-> Eclipse Marketplace.   You will see below screen. Steps 2: Type “TestNG” in “Find” test box and … Continue reading TestNG Tutorials 3: Installation Of TestNG In Eclipse ==> Using Eclipse Market Place And Install New Software Options

Hello Folks, In last post, we have seen the requirements of TestNG in Selenium webdriver. We will learn how can we install TestNG in eclipse. TestNG is a jar file. Any JAR file stands for Java ARchive which is a package file format typically used to aggregate many Java class files and associated metadata and resources (text, images, etc.) into one file for distribution. We … Continue reading TestNG Tutorials 2: Installation Of TestNG In Eclipse ==> Download And Add To Build Path Way

Hello Folks, We have written so many automated scripts in previous posts. We wrote those scripts inside a main method. To run that particular script, we ran main method of that particular class. Let’s assume that we have 100 test scenarios to automate and we developed 100 test scripts using typical style of writing java … Continue reading TestNG Tutorials 1: Why Do We Require TestNG In Selenium?

Hello Folks, Let’s learn something interesting in selenium webdriver. We know whenever we launch a browser, first browser serve is started which helps in communication between browser and selenium commands. The same process is repeated for every test if you launch and quit browser every time. Let’s understand above point with an example below: Run … Continue reading Controlling Browser Driver Services In Selenium WebDriver

Hello Folks, It is very frequently asked interview question. Interviewer expects that you should be aware about internal logic of selenium. We know that to launch a browser through Selenium we need to download a browser driver executable file (chromedriver.exe, geckodriver.exe etc). Why do we require that? Let me relate it with a real time … Continue reading Why Do We Require Browser Driver Executable File To Launch A Browser In Selenium WebDriver?