Skip to main content

All Questions

Filter by
Sorted by
Tagged with
-1 votes
1 answer
21 views

How can we run multiple Automation projects parallelly in Eclipse IDE?

I have different maven/java projects folder in Eclipse IDE and i usually run those with "Run Configuration". These are Selenium and Cucumber based projects which have a TestRunner.java class ...
test140655's user avatar
1 vote
1 answer
242 views

What is the best practice of dependsOnMethods in TestNg?

I know that having interdependent tests is a bad idea. But, then my question is: What are the valid usecases of dependsOnMethods which TestNg team provided ? In other word, under what conditions i can ...
Jimmy's user avatar
  • 257
0 votes
0 answers
362 views

How to verify the Json response field data type in rest assured test

How can we verify the Json data type of mentioned fields such as "price", "ck", "name", "enabled" and "tags" in rest assured test. { "odd":...
swapnil shirke's user avatar
0 votes
1 answer
7k views

Cannot invoke "org.openqa.selenium.SearchContext.findElement(org.openqa.selenium.By)" because "this.searchContext" is null error

I am trying to verify a functionality as a guest user and logged in user. In order to do that I log out form the system and verify the guest user actions then login again and verify logged in user ...
Darshani Kaushalya's user avatar
0 votes
1 answer
138 views

How do i get rid of duplicated local variables

I have a multiple drop-downs and need to automate them. I added the code below, how do I add them in one step? or make it easier or how do I add them in one function? I'm using eclipse and TestNG ...
user52764's user avatar
2 votes
2 answers
247 views

Is it necessary to Assert web page title in every case?

I am writing a script in Selenium and TestNG to automate Add User profile pages. Now, when I land on every new page, then do I need to write Assert.equals("add user profile", driver.gettitle(...
Nitin67's user avatar
  • 31
1 vote
3 answers
3k views

When should we use Assert.true() instead of Assert.equals() method in Selenium?

What's the difference between these 2 Assert class methods?
Tester68's user avatar
0 votes
1 answer
222 views

Why dont we use the main() method in TestNG class?

public class Tests{ @Test public void run(){ sop("this is test method 1"); } } How will Jvm know about entry point of the program? 🤔
Tester68's user avatar
0 votes
2 answers
2k views

How can I run a login test for 100 users at the same time using Selenium, TestNG and Cucumber? [closed]

I am a newbie in Automation testing. I have a list of 100 users in a excel spreadsheet: User1: userid1/password1 User2: userid2/password2 ... and so on. I need to create a script and make all 100 ...
matt038's user avatar
  • 13
0 votes
2 answers
59 views

Seeing NullPointerException on running TestNG Selenium Framework

Written the Test Script in TestNG framework where the Open browser activity is happening in "baseClass" under @BeforeTest annotation and the Test Script is written in Test Packages under as @...
Rahil Kumar's user avatar
1 vote
2 answers
850 views

How to automatically execute failed testing cases on Jenkins using extent report

I'm looking for a solution to execute failed test cases automatically on Jenkins. I'm currently running test cases through pom.xml which points to testng.xml I'm using extent reports to capture and ...
Shavaiz Safdar's user avatar
1 vote
1 answer
91 views

How to retrieve test method status and other values in IReporter implementation

I need to retrieve test method status, actual result, expected result & other attributes in IReporter implementation. Is it possible to use ITestResult to pass required data to generateReport() ...
senura's user avatar
  • 21
2 votes
2 answers
3k views

java.lang.UnsupportedClassVersionError -CucumberJvm4SMFormatter -Java runtime Version error

My testing framework is built with Cucumber, TestNG, Java 1.8 and Maven I recently updated my IntelliJ IDE Details: IDE : IntelliJ IDEA Ultimate 2020.3 - Runtime version : 11.0.9 Cucumber is ...
Hima's user avatar
  • 31
1 vote
1 answer
572 views

Automated testing of Google Pub/Sub

I'm new to test automation and Google Pub/Sub. I'm developing automation scripts for regression testing. My automation framework is built with Java, Maven, Cucumber and TestNG My application is a ...
Hima's user avatar
  • 31
0 votes
1 answer
4k views

Cucumber- Selenium Getting null pointer exception while openBrowser method

I am getting null pointer exception when selenium tries to launch the browser. I have already checked step Definition. Selenium OpenBrowser Method. Chrome browser version. ( I have driver 87.04 ...
Hemant Varhekar's user avatar
2 votes
1 answer
136 views

How to debug TestNg Test Execution getting crashed due to large number of test cases

I have a test suite having 10000+ test cases, and as all these test cases run under one suite (Regression Suite), my suite getting crashed always due to very high memory consumption, maybe the size of ...
Nikunj Aggarwal's user avatar
1 vote
1 answer
1k views

Null Pointer Exception Error at Selenium TestNG

I'm trying to automate the search box but I'm getting null pointer exception. package LICT.Maven_ReCheck_Search; import java.util.concurrent.TimeUnit; import org.openqa.selenium.WebDriver; import ...
Sarowar Alam Saidi's user avatar
0 votes
0 answers
3k views

Not able to run my test from testng.xml file

I'm not able to run by test case from testng.xml file after run of file I'm getting that Total tests run: 0, Failures: 0, Skips: 0 but if I will try to run the test class directly then test will run. ...
Upkar Singh's user avatar
2 votes
1 answer
2k views

testNG, Java: How to combine a few Data Providers in one test?

In the provided test I need to read the data from the cell in Excel and it works. I would also like to add the functionality to store the price of the product in another cell in the Excel. I've split, ...
Beti's user avatar
  • 327
2 votes
1 answer
218 views

Selenium Dataprovider returns a NegativeArrayException when called from different class

I have an excel, which contains multiple worksheets in it. Each worksheet contains multiple columns. I have a class like this. public class dptwo extends dpone { @Test(dataProviderClass = testdp.class,...
user12730187's user avatar
0 votes
1 answer
781 views

TESTNG, how to validates test case results to pass fail status [duplicate]

Need help, my question here is how can I code it such when the result is not expected testNG will display the test case as failure/fail? if the result is expected test case result is passed? very new ...
user1579414's user avatar
3 votes
2 answers
703 views

What is the difference between BeforeClass and BeforeTest in TestNG - Selenium WebDriver

What is the difference between BeforeClass and BeforeTest in TestNG - Selenium WebDriver, please suggest me best link or site for this.
sushen's user avatar
  • 100
2 votes
0 answers
337 views

BeforeClass doesn't get displayed in TestNG test results window

We are expanding our TestNG suite to run multiple tests. Doing so we've encountered a strange occurrence. In one suite I have two tests. Both tests have one class each. Tests in IntegrationTest.java ...
Nikola Pepic's user avatar
0 votes
0 answers
1k views

While running TestNG program in eclipse getting error: A JNI error has occurred, please check your installation and try again

Getting JNI error while running TestNG program (that doesn't have main() function). But If trying to run the same program with same set of configuration (i.e. eclipse and java version), "Run as a ...
Gaurav's user avatar
  • 23
0 votes
2 answers
199 views

Run appium scripts without using Eclipse or any IDE

I developed appium scripts for my Android app in Eclipse and using this IDE to execute. But I wonder there's any way to run appium scripts on other PC without installing Eclipse or any IDE. I also ...
phong tran's user avatar
0 votes
1 answer
215 views

TestNG how to build a queue of test cases to be retried

Currently, we have logic in place which retries all the failing test cases immediately after the failure, what could be any approach where if a test fails that test should go in a queue and should be ...
Nikunj Aggarwal's user avatar
1 vote
1 answer
2k views

How to select a dropdown value in Selenium WebDriver using Java appium?

I am new to Selenium, currently am working on selenium webdriver. I want to select a value from the drop-down. But I am not able to do it because of some error. Also, I want to inform you that in my ...
Rahul Kumar's user avatar
0 votes
2 answers
618 views

How to rerun failed test from where they instead of from beginning? (TestNG)

Is there any way to re run the failed testcase from the page where it got failed instead of running the testcase from beginning in Selenium Java ?
Nikhil Loyalka's user avatar
0 votes
1 answer
2k views

Selenium TestNG - java.lang.NullPointerException in automation testing

I am trying to test the login function to my android app. But it displays an exception error java.lang.NullPointerException. Code as follows: package tests; import java.io.IOException; import java....
Rahul Kumar's user avatar
0 votes
1 answer
6k views

How to resolve the "java.lang.nullpointerexception null value in entry url=null " in Selenium(POM)

1.TestCommands.java public class TestCommands { public void click(By locator,WebDriver driver){ try { WebElement element = driver.findElement(locator); element.click(); ...
user3806999's user avatar
1 vote
1 answer
219 views

In gradle 4.6, how to force all tests in a class gets executed first before moving to tests in next class?

I am using Gradle 4.6 with testng. My test suite has tests organized something like these. java class1 { test 1.1 test 1.2 test 1.3 test 1.4 } java class2 java class3 java class4 java class5 All ...
Venkat's user avatar
  • 11
0 votes
2 answers
1k views

TestNG with Eclipse: How to add main class?

How can I add main class in eclipse cucumber project. I am running cucumber feature file and using TestNG but getting error: "cannot find class in classpath" and as a resolution of this I am geeting ...
user41667's user avatar
2 votes
1 answer
33 views

Unable to get multiple browsers working with Chrome and IE Edge browsers

I'm new to QA testing. I was practicing automating test case in TestNg, but can't seem to get the cross browsers to work. The test keeps failing. It worked when it was just one browser. Any ...
qatester19's user avatar
0 votes
1 answer
1k views

Unable to Run Tests on Edge browser in Jenkins

I am trying to run my Tests in the Jenkins using Microsoft Edge. When I click on build now, I am getting the below error in the Console Output ------------------------------------------------------ ...
User1208's user avatar
-1 votes
1 answer
74 views

How to validate test logic for date dropdown?

I have a close date field where the date is already populated, and a date creation field which is the actual activity creation date and the logic I want to validate is below - Validate that the ...
Akshay Dongar's user avatar
1 vote
1 answer
480 views

Is there a way to disable the logs created by the pagefactory

Could someone please let me know if there is any way we can disable the logs generated by the page factory for Chrome and Firefox I did try the below options for chrome and firefox and I had also ...
User1208's user avatar
1 vote
2 answers
1k views

How to write meaningful test case title in TestNG+Selenium

When writing manual test cases, the test case title used to be something like TC1: Verify that the user is able to login to facebook and react using heart. When trying to automate the scenario ...
PDHide's user avatar
  • 11.1k
0 votes
6 answers
318 views

Is using "Selenium & Test NG" the best approach to Automate Regression Test Cases for Web based Application? [closed]

We have a requirement to automate Test Cases for a Web based application. We have to use only open source tools. Total Test Cases would be around 600-700.
Ramkrishna Bhandare's user avatar
0 votes
1 answer
261 views

Unable to execute single tc, login then run other application features, right now its running as a suite

I have to execute my test cases as a single as well as a suite, right now its running as a suite but not as a single test case in selenium webdriver: Below is my test which are calling methods present ...
jay's user avatar
  • 13
-1 votes
2 answers
50 views

Should you test regression tests or just verify/check?

When conducting regression tests, the goal is to find out if the new release affects existing functionalities of the application. Is it enough just to check/verify the application or should one test ...
Antonow297296's user avatar
0 votes
1 answer
45 views

TestNG with multiple datadriven

My code structure logic is this: I have to fill three sequential forms to add a entry in a list whose data is from Excel. I need each form to have entries from different Excel sheet, i.e first form's ...
Akshara's user avatar
  • 11
0 votes
1 answer
2k views

Selenium WebDriver "Cannot instantiate class " error is coming

Below is my Base Class: package com.mercury.qa.base; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.Properties; import java.util....
Preet's user avatar
  • 1
0 votes
1 answer
5k views

Getting 'java.lang.NullPointerException' on executing test Cases

import org.openqa.selenium.WebDriver; import org.testng.Assert; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations....
littin jomon's user avatar
0 votes
1 answer
1k views

Is there any possibility to open a new tab in existing window in selenium? [duplicate]

I have tried to open new tab in existing browser but it opens in new browser.
Rohit Soni's user avatar
-1 votes
3 answers
751 views

Getting Null pointer expections " java.lang.NullPointerException "

[RemoteTestNG] detected TestNG version 6.14.3 1553664942228 mozrunner::runner INFO Running command: "C:\Program Files\Mozilla Firefox\firefox.exe" "-marionette" "-foreground" "-no-remote" "-...
Sathish's user avatar
0 votes
2 answers
3k views

Using TestNG framework : How to call other class of the methods

Using TestNG framework : How to call other class of the methods I have created one class for login and another class for add customer details. My scenario is: Once user login after add customer ...
devang suthar's user avatar
2 votes
2 answers
6k views

How to execute just 50 test cases out of 500 test cases in testNG

There are 500 test cases in my suite. I want to select only 50 test cases and execute them. Is there a way to do it using testNG
Neela's user avatar
  • 21
2 votes
2 answers
77 views

Getting Nullpointer Exception

While i run this below code i am getting Null pointer exception. import java.util.concurrent.TimeUnit; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import ...
Kumaravel K's user avatar
0 votes
1 answer
45 views

after click on submit button record will added to the table, so how to verify that record is added or not in the table

There is add employee form, so how to verify the record, should I match the all fields of form which display on table or just match the name, also table is dynamic with pagination.
Upkar Singh's user avatar
0 votes
1 answer
2k views

how to run same testcase in 2 different URL in selenium JAVA [closed]

How do I run the same test case in 2 different URL which has same functionality
Priya's user avatar
  • 1