Found 362 Articles for Selenium

Element Methods in Selenium Python

Jaisshree
Updated on 23-Aug-2023 08:55:35

798 Views

Selenium, an open source automation testing tool is used with other programming scripts like python , java , javascript and pearl to test web applications. It is widely used by developers for automation testing. Element Methods of Selenium 1. send_keys () − Used for setting up input text boxes which includes edit box, text area, fields inside forms and modifier keys. It extends properties from the keys class. Return Type − null 2. is_selected() − Checks if an element is selected or not by the user Return Type − boolean value ( True or False). 3. is_displayed() − Checks ... Read More

How to Download the Latest TestNG Jar File?

Ashish Anand
Updated on 21-Aug-2023 12:53:44

4K+ Views

TestNG is an open−source automation testing framework. It can be used along with build tool such as maven, Gradle, ant and even with snapshot. However, user can separately download the TestNG jar file and configure it with the project without using build tool. In this article, we will see how to download latest TestNG jar. Download latest TestNG jar Following steps should be followed to download the latest/specific version of TestNG jar. Open the browser and navigate to https://testng.org. Once page opens, click on Download present at top. Following screenshot displays testing.org page and download button. ... Read More

Why to use Selenium with TestNG?

Ashish Anand
Updated on 21-Aug-2023 12:49:53

396 Views

TestNG is a powerful testing framework, an enhanced version of JUnit which was in use for a long time before TestNG came into existence. NG stands for 'Next Generation'. TestNG framework provides the following features − Annotations help us organize the tests easily. Flexible test configuration. Multiple test cases can be grouped more easily. Parallelization of tests can be achieved using TestNG. Support for data− driven testing. Inbuilt reporting as well as supported by Extent Reporting and other reporting tools. Selenium by default doesn’t generate any report. Easily configured for Cross Browser testing. TestNG framework can easily integrate ... Read More

Why does TestNG Allow Several Expected Exceptions?

Ashish Anand
Updated on 21-Aug-2023 12:45:28

391 Views

TestNG supports multiple exceptions in single @Test method. It is similar to the catch exception in Java where user can mention multiple exception class those are possible to be thrown. Ex: Syntax in catch exception is: catch(IOException | InterruptedException ex) { Similarly, syntax in TestNG is: @Test(expectedExceptions={NullPointerException.class, IllegalArgumentException.class }) public void throwsNullPointer() { throw new NullPointerException(); } One point to note that, in such scenarios, TestNG expects the one of the exceptions must be thrown from the list. If exception is different from the list or no exception, in such cases it fails the method. ... Read More

Mobile

How to do Cross Browsing Testing in Selenium with TestNG?

Ashish Anand
Updated on 21-Aug-2023 11:09:50

242 Views

TestNG is a powerful testing framework, an enhanced version of JUnit which was in use for a long time before TestNG came into existence. NG stands for 'Next Generation'. A website should be tested across multiple browsers like IE, Chrome, Firefox, Safari to validate the compatibility of website and functionality. Since the HTML, CSS and java scripts are unique across all browsers, it is always recommended to do cross browser testing to ensure the compatibility of website. Selenium supports cross browser testing so does the TestNG. In this article, we will analyze how to perform cross browser testing in Selenium ... Read More

How to update IntelliJ Idea testng-plugin to testNG version 6.8 or latest version?

Ashish Anand
Updated on 17-Aug-2023 14:23:25

766 Views

TestNG is an open−source automation testing framework. It can be used along with build tool such as maven, Gradle, ant and even with snapshot. However, user can separately download the TestNG jar file and configure it with the project without using build tool. In this tutorial, we will see how to update IntelliJ IDEA testing−plugin to TestNG version 6.8 or latest TestNG jar. Download latest TestNG jar Following steps should be followed to download the latest/specific version of TestNG jar. Open the browser and navigate to https://testng.org. Once page opens, click on Download present at top. The ... Read More

How to set TestNG in classpath in Maven project?

Ashish Anand
Updated on 17-Aug-2023 14:17:03

531 Views

Maven is a project management and comprehension tool that provides a complete build lifecycle framework. User can automate the project's build infrastructure in almost no time as Maven uses a standard directory layout and a default build lifecycle. In case of multiple environments, Maven can set−up the way to work as per standards in a very short time. As most of the project setups are simple and reusable, Maven makes life easy while creating reports, checks, build and testing automation setups. Maven provides developers ways to manage the following − Builds Documentation Reporting Dependencies SCMs Releases Distribution Mailing list ... Read More

How to separate unit and integration tests in TestNG + Maven using Annotations?

Ashish Anand
Updated on 17-Aug-2023 14:15:27

301 Views

TestNG is a testing framework and can use Maven as build tool. It helps to maintain dependencies and their version at one place in pom.xml User can run test from testng.xml or pom.xml. To run tests from pom.xml, user need to mention the path of testng.xml and require maven−surefire−plugin to execute. Along with testng.xml, maven provides feature to run specific group through maven or command line. While running through command line, user can mention group name at run time without changing anything either in testng.xml or pom.xml. This feature can be utilized to separate unit and integration tests. User can ... Read More

How to run single test in a TestNG class from IntelliJ IDE?

Ashish Anand
Updated on 17-Aug-2023 14:12:20

631 Views

TestNG allows to run the test suites from IntelliJ IDE as well as command line. Usually, IntelliJ IDE is handy to run testng.xml for development purpose while command line (cmd) for actual execution. Apart from this, IntelliJ supports to run only single TestNG class as well as single test method inside a class. This feature helps while writing the code and debug it. In this article we will discuss how to run a single testng class as well as single test method inside a testng class. Approach/Algorithm to solve this problem Step 1: Create a TestNG class &minus ... Read More

How to run Junit test in Maven?

Ashish Anand
Updated on 17-Aug-2023 14:10:55

2K+ Views

Maven is a project management and comprehension tool that provides a complete build lifecycle framework. User can automate the project's build infrastructure in almost no time as Maven uses a standard directory layout and a default build lifecycle. To summarize, Maven simplifies and standardizes the project build process. It handles compilation, distribution, documentation, team collaboration and other tasks seamlessly. Maven increases reusability and takes care of most of the build related tasks. Junit is a testing framework and can use Maven as build tool. It helps to maintain dependencies and their version at one place in pom.xml User can run ... Read More

1 2 3 4 5 ... 37 Next
Advertisements