All Questions
101 questions
-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 ...
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 ...
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(...
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?
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 ...
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 @...
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 ...
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 ...
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 ...
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.
...
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,...
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.
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 ...
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 ...
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 ?
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....
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(); ...
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 ...
-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 ...
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 ...
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.
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 ...
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....
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....
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.
-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" "-...
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 ...
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 ...
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.
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
1
vote
2
answers
879
views
How can users run TestNG cases without using an IDE?
I run my test using Java, Selenium and TestNG.
When I execute my test suite I have it set up where the testng.xml has all the configurations to run my tests. I am wondering, if I can set up some UI ...
0
votes
1
answer
260
views
Simplifying Setup of TestNG/Selenium WebDriver Test Classes (using Google Guice?)
I am developing test cases using Selenium and TestNG, and am following the Page Object Model design pattern.
Currently, my page classes look like this (Page1 is just a placeholder, they all have ...
0
votes
1
answer
129
views
I need to verify a dynamic table record, if they match with data then PASS else Fail the test case using Assert
Page Object Class
public class Transactions {
WebDriver driver;
boolean result1;
public Transactions(WebDriver driver) {
//super();
this.driver = driver;
}
public void ...
0
votes
2
answers
5k
views
How to pass the web driver instance from one testcase class to another testcase class in TestNG?
InitializeDriver.java:
public class InitializeDriver{
WebDriver driver;
public WebDriver getDriver() throws Exception{
driver = new FirefoxDriver();
System.out.println("Initialize ...
0
votes
5
answers
13k
views
Print all product details in search results using Selenium Java
I am trying to print product details from searched results from this page.
This is the function I used for that.
@Test(priority = 1)
public void printSearchItem() {
// print the product details
...
0
votes
1
answer
828
views
How to format TestNG reports in second not millisecond ?
I want convert the milliseconds to seconds in TestNg emailable report.
Please help?
-1
votes
3
answers
3k
views
How to click on the image inside a grid using selenium webdriver?
I have to click on an image inside a grid. Grid elements have dynamic ID's. Therefore it's impossible to capture elements as usual. How can click on this image?
I have boxed the image I ...
1
vote
1
answer
1k
views
How to control TestNG to iterate all Tests in each iteration instead of iterating individual tests before moving on to the subsequent test
Problem - I have 6 tests and one dataprovider with 2*2 object array.
I want TestNG to pick first data, use it in First test and then subsequent tests are executed based on the data picked in first ...
0
votes
2
answers
4k
views
Selenium Webdriver TestNG (Java) using While loop for all tests
I am new to Selenium Webdriver Testng and trying to Develop Data Driven framework using CSVReader
I have 5 tests in Testng and have to run those all on different environments. So basically I have to ...
0
votes
1
answer
610
views
Dynamic Tests using TestNG selnium arrays
What is the best approach of the follwoing scenario.
I have to run a number of tests which take in dynamic data. The first set of values are pretty standard but then one is dynamic and can be any ...
0
votes
3
answers
1k
views
Why my code is not working when I click on the same button for multiple times?
I have same Skip button types kept for 99 products. When I need to click that, it will bring a popup. In the popup I need to click the Cancel button. Each time when I click on the Skip buton it will ...
6
votes
5
answers
2k
views
When and how to do regression testing?
I am learning selenium. I am trying to get into more and more automation.
Scenario (example):
We are working in agile 2-week sprints. We have a release after every 3 sprints.
In our framework, we have ...
2
votes
2
answers
8k
views
testng.xml is not executing when we run pom.xml for maven project selenium
While executing my pom.xml file through maven test my BUILD is getting SUCCESSFUL but my testng.xml is not executing.
I tried with executing 13 classes and with single class for both the time it ...
1
vote
4
answers
19k
views
How to resolve NoSuchElementException in Selenium with java?
CODE:
driver.findElement(By.name("USER")).sendKeys("XYZ");
driver.findElement(By.name("PASSWORD")).sendKeys("abc");
I have tried various ways not just name but by xpath, css selectors but every time ...
3
votes
3
answers
2k
views
Is it possible to test dynamic web sites using selenium?
I have a dynamic web site which is developed using angular (front end). Elements cannot be identified using ID,name etc... as they are not used to name elements. But models have used to name elements ...
1
vote
4
answers
3k
views
How to solve java.lang.NullPointerException error in button click event?
I'm using Java,Selenium web driver and TestNG framework. I have a method to click a button in web page. But it didn't work. When debugging I could find xpath is not passed to the button. Then I tried ...
3
votes
2
answers
76k
views
How to find a button using both xpath and button text?
I have three buttons withing a div. All three buttons belong to same class (class names are same). What I want to do is capture each button using its text (Buttons have different texts) and xpath of ...
-2
votes
1
answer
609
views
Page chaining in POM method
I have created three packages.
generic
webpage
script
In generic I have base test and other common methods.
In webpage I created class for each web page.
In Script I have my testcases.
I need ...
1
vote
1
answer
629
views
When submitting a form by fetching values from excel file it is showing Internal Server Error
When submitting a form by fetching values from excel file it is showing Internal Server Error but when I put static values in code and run it successfully submits the form without any error.
Here is ...
0
votes
1
answer
6k
views
Getting 'nullPointerException' in @AfterMethod [closed]
Code:
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.annotations.AfterMethod;
import org.testng....