Questions tagged [java]

Questions about testing applications written in Java or test automation written in Java, a popular programming language and runtime environment which allows Java programs to run unchanged on most hardware and software platforms.

Filter by
Sorted by
Tagged with
0 votes
0 answers
23 views

How to connect to a Anti-Detect browser (Incogniton) using selenium java

I want to connect to a browser session of this specific anti-detect browser called Incogniton. It does support Selenium browser automation, but it only supports Python. I don't know anything about ...
likenzy's user avatar
-1 votes
0 answers
17 views

When I executing the following code [closed]

Could someone help me to find the solution or reason for this?
subhashree sahoo's user avatar
0 votes
0 answers
20 views

How to set --disable-web-security in PlayWright - Java

Is there any possibility to pass "--disable-web-security" parameter when opening a new web page, as we do in selenium. Edit: I was able to get it done by below code String[] ...
ChathuD's user avatar
  • 2,131
-1 votes
0 answers
27 views

Run module test project from Parent Project

I had a parent project with several modules project called module Bulitv3, NST, BHarian, and FMT. Each of them has their own test manager. How to run from the parent project test manager called ...
nicholas's user avatar
-1 votes
0 answers
32 views

Consolidate Extent Report into single report with module project

I had several independent IDEA maven project which run perfectly fine. I need to combine them into one single parent project due to consolidate reporting issues. The purposes of create such multi ...
nicholas's user avatar
1 vote
1 answer
50 views

How to share data between steps in Cucumber feature file?

I am designing automation scripts using the REST APIs, RestAssured with Cucumber BDD framework. I have multiple APIs where one API's response is used as a parameter in another API. Here is my feature ...
iAutomate's user avatar
  • 359
0 votes
0 answers
17 views

How to select drop-down value from CSV file using Apache POI - Selenium Java

I am currently working on a web form (Selenium Automation) where I need to display values from a CSV file in a drop-down input text field. I've managed to read the CSV data using Apache POI and ...
Anony's user avatar
  • 1
-1 votes
1 answer
24 views

Selenium - Page Object Model - Good way to identify page during a dynamic flow

My application has a possible flow to get all info from the user, where at max might consist of pages in the order A->B->C->D->E->F, each page asking for different info until we get to ...
saltine springs's user avatar
-1 votes
1 answer
19 views

This element is working on Jenkins previously, but not working now on Selenium Java Cucumber BDD framwork. I am facing this issue consistenly

Results : Tests in error: invalid selector: Unable to locate an element with the xpath expression None edit reseller content lib because of the following error: SyntaxError: Failed to execute '...
Ammar Ahmed's user avatar
-1 votes
1 answer
33 views

I am facing an issue on selenium java jenkins framework. Element working on Local maven project build but not working on Jenkins

And And I enter Auto Created Reseller in BA Reseller add button edit field org.openqa.selenium.InvalidSelectorException: invalid selector: Unable to locate an element with the xpath expression None ...
Ammar Ahmed's user avatar
0 votes
0 answers
90 views

How to get list of li elements using Selenium correctly?

I'm using Selenium in the following manner as below: ChromeOptions options = new ChromeOptions(); /*options.addArguments("--headless"); options.addArguments("--...
invzbl3's user avatar
  • 117
0 votes
0 answers
37 views

selenium java modifications to the dom, how to reload the page to display modifications

0 I have a driver in java selenium : driver.get(url); I have made some changes to a WebElement with this method : JavascriptExecutor jse = (JavascriptExecutor) driver; jse.executeScript("...
user3021955's user avatar
0 votes
2 answers
184 views

How to by pass authentication(microsoft authenticator) while login into the website through selenium script

After passing login id and password, user must add code from mobile app - microsoft authenticator. I want to bypass this code pop-up as I'm generating regression suite and it's not feasible to add ...
Helly's user avatar
  • 1
0 votes
1 answer
35 views

How can I run all the tests of a class sequentially using each dataset from @DataProvider in TestNG

I have a test class with few tests in it. A data provider which takes data from excel sheet. What I am trying to achieve is having one data set, say dataset1, and run all the tests of the test class, ...
Pypal's user avatar
  • 31
0 votes
1 answer
51 views

The selector is not recognized by selenium java

I have the following HTML code for a button: <div class="link" data-background-color="#fb00ff" style="background-color: rgb(251, 0, 255);"> <div data-replace-...
AAa's user avatar
  • 1
0 votes
1 answer
36 views

I get a timeout error after clicking a button (not a page load) in Selenium for Java

I get a timeout error after clicking a button (not a page load) in Selenium for Java. The button triggers a recalculation and causes the cursor to spin and be unavailable for the 5-6 minutes until the ...
Jason Krynicky's user avatar
0 votes
1 answer
42 views

Execute same test scenarios in two different browsers simultaneously

We have created web automation scripts for particular website. And now the manual QA team requested to automate mobile responsiveness as well so we are using below code to achieve mobile ...
Darshani Kaushalya's user avatar
0 votes
1 answer
30 views

Multiple verifications under one test - if one of the verification fails how to continue to verify the remaining

I'm working with selenium/Java /TestNG Maven project. Main function calls multiple validation from java class. If any one of the verification fails, the remaining are skipped. From the below code if, ...
Padmaja's user avatar
0 votes
1 answer
70 views

Why does this Selenium script sometimes fail to detect that the element has become stale?

This is a helper method we use in many places in our Selenium Java tests. The intent is to click a button and then detect that the browser has navigated away from the page by detecting the staleness ...
Nzall's user avatar
  • 475
0 votes
0 answers
18 views

why my page is not scrolling full at the bottom in selenium testNG(java)?

The images below are my codes(Singleton,homepage and test classes) I'm new to automation and I tried to achieve POM using Singleton now my problem is whenever I try to run my test cases it navigates ...
Shabbin Hossain's user avatar
0 votes
1 answer
77 views

How to capture the element using srcset attribute?

I'm trying to understand the difference between the data-srcset and srcset attributes. I need to get a photo by the srcset attribute, but I can only get it using data-srcset. I don’t really understand ...
invzbl3's user avatar
  • 117
0 votes
1 answer
73 views

"com.jacob.com.ComFailException: Can't co-create object" with java 11

Im working with SAP test automation with the JCOB DLL 1.18.64bit library. My code was working fine when I run the test with Java 8. But when I set the project settings to Java 11, I got below error. ...
ChathuD's user avatar
  • 2,131
0 votes
1 answer
18 views

Appium version issue

I am confused to see what Appium version is installed on my machine. If I look into Appium UI it shows Appium v1.22.3 but When I check from cmd it shows 2.0.0-beta.71. how do I know which one is ...
Jahanzaib.Khan's user avatar
-1 votes
1 answer
24 views

I am manually putting ID generated via POST method in PUT,GET method, How to Auomate it

ISSUE- Using post method, ID get generated in response(id=ff80818188956aa6018899e27b76038b), now I don't want to put this id generated in PUT,DELETE,GET, manually(as I am doing below) Can you please ...
chinmay k's user avatar
0 votes
0 answers
27 views

Ashot compatibility with Windows zoom

When i try to use Ashot to take screenshots of errors on my pc i have a probleme where the images of the website arent taking completly. What we have when we execute the code : What we want : When i ...
Yan's user avatar
  • 11
-1 votes
1 answer
22 views

I have a method where i have taken the rowcount of 10 records on page load and 15 records after changing the page no to 15 question how to validate

I have a method where i have taken the rowcount of 10 records on page load and 15 records after changing the page no to 15 question here is how to validate by creating a Assert method seperatly in ...
user56056's user avatar
0 votes
1 answer
86 views

Calender is clicking on the next button getting element click intercept exception it just clicks once on the next button in the calender

Steps: I am trying to click on the Calendar and select the Date from the Calendar and also select year and month but it just clicks once in the next button after opening the calendar and leads to ...
user56056's user avatar
0 votes
0 answers
47 views

Unable to locate an element when "show user agent shadow DOM" is enabled

As for the image, I need to capture an element which is under show user agent shadow DOM. I tried using //*[@id="placeholder"], but as for the image, its Zero matches. By looking at some ...
ChathuD's user avatar
  • 2,131
-2 votes
3 answers
185 views

What is a NullPointerException, and how do I fix it?

My test automation returns NullPointerException. What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that ...
0 votes
0 answers
292 views

Java Cucumber - junit does not run any test

could you tell me why "mvn test" or "mvn verify" does not run any test ? Maybe any dependency is missing ? package cucumber.Options; import io.cucumber.junit.Cucumber; import io....
javabeginer's user avatar
0 votes
1 answer
2k views

Java maven - IllegalArgumentException: Input must be set

I get the following errror when I use git bash command - however when I run the test in Intellij everything works fine and test starts. Could you help ? mvn test -Dcucumber.filter.tags="@desktop&...
javabeginer's user avatar
0 votes
0 answers
480 views

Java Cucumber - pretty html reports net.masterthought - No JSON report file was found

I get the following error when I run the code About to generate Cucumber report. May 02, 2023 6:55:06 PM net.masterthought.cucumber.ReportBuilder generateErrorPage WARNING: Unexpected error net....
javabeginer's user avatar
0 votes
2 answers
173 views

Java selenium - pretty cucumber reports not generated with screenshot

could you tell me how to generate pretty html reports with screenshot ? After I run the test the "cucumber-reports.html" does not exist. Only "image.png" file is generated. ...
javabeginer's user avatar
1 vote
2 answers
49 views

WebDriver linkText with CSS manipulations

I have an HTML with the following element: <a href="index.html" style="text-transform: uppercase;">index</a> I'm using selenium-java 4.8.2, Chrome 112 and JUnit 5.9.2, ...
mt85's user avatar
  • 13
0 votes
0 answers
29 views

Have a Screen whereI once click on the text box the up and down arrow will become visible to click but it is not clicking and is not throwing a error

I added this piece of code: Any inputs to get this working would be helpful WebElement inputElement = driver.findElement(By.cssSelector("input[type='number'] [formcontrolname='sample']")); ...
user56056's user avatar
0 votes
1 answer
624 views

Getting java.lang.IllegalArgumentException: Keys to send should be a not null CharSequence as the stored value returns null Any leads would be helpful

Scenario: There are 3 fields in the Screen where i enter a number in the 1st field text box and i need to enter the same number in the 3rd and 4th text box as well ///So in this case i have created ...
user56056's user avatar
0 votes
1 answer
159 views

Java selenium - null pointer exception on webDriver inheritance

I am getting null pointer exception. Would you be able to help and what should be fixed ? java.lang.NullPointerException at pages.LandingPage.acceptConsent(LandingPage.java:14) at stepDefs....
javabeginer's user avatar
2 votes
1 answer
910 views

Selenium latest version is not able to launch FireFox browser in Ubuntu 20.04

I'm trying to automate web tests with Selenium and Java in Ubuntu OS. Earlier versions of Selenium used to work very well with older version of Firefox in Ubuntu. Since I upgraded to Selenium 4+ (...
RonyPatricks's user avatar
0 votes
1 answer
14 views

Getting NullPointerException while running the simple testNG script

Code as below: Public class sample { @Test Public void test() { Syso("hi"); } }
user55826's user avatar
0 votes
2 answers
340 views

Facing challenges to run java selenium tests with gitlab runner

I am trying to run cucumber maven tests on gitlab ci using selenium grid, from the output I have observed that containers for grid setup are up and running. But I am not able to run my cucumber tests ...
SRM21's user avatar
  • 299
0 votes
0 answers
134 views

Not able to run selenoid tests with gitlab using dind for java maven tech stack

I am relatively new to gitlab and selenoid. I have been trying to run my tests on selenoid with gitlab and below is what my gitlab-ci.yml file looks like: image: maven:3.8-openjdk-11 variables: ...
SRM21's user avatar
  • 299
0 votes
1 answer
2k views

org.openqa.selenium.interactions.MoveTargetOutOfBoundsException: move target out of bounds

I am passing input to rich text field. For that I have written the code below: public void inputToDescriptionField() throws InterruptedException , AWTException { wait.until(...
Vighnesh Ransing's user avatar
-1 votes
1 answer
57 views

For Android testing (using Java), is it better to have Accessibility IDs put in, or will Element IDs or just "id" suffice?

An Android app to be automated tested has no Accessibility IDs (aka element's content-desc attribute) whatsoever. I'm hearing that it would be good for the developers to put this in, but I've also ...
ackmondual's user avatar
2 votes
1 answer
784 views

Differences between Resource ID, TestID, Element ID, ID, and Accessibility ID?

This info is so scattered across some of my searching. However, I'd like to get the community's knowledge on this. Especially for the purposes of locating elements in code (Appium, testing Android app,...
ackmondual's user avatar
0 votes
2 answers
141 views

how to automate a date picker that not in a table tag

I want to automate that starting date and end date but in DOM I can't find a Table tag for date picker so I don't know how to locate the field. The tag is <input class="inputvd" type=&...
Anish subramanian's user avatar
-1 votes
1 answer
209 views

How to validate invalid date error message in Selenium Java project?

I have a "Date" field on my page I want to automate. Now, when I enter invalid value or invalid format, then its displays an error like: "This is invalid value for "Date" ...
qatester249's user avatar
0 votes
0 answers
268 views

Cucumber TestNG Gradle Parallel Execution ThreadCount

I am trying to run my Cucumber scenarios in parallel using the TestNG. But when I run it 'parallel=true' it executes the test cases in thread count=10 (testng default). I want to customise the thread ...
Alok's user avatar
  • 760
0 votes
0 answers
35 views

How to terminate the application and make the launcher return to its call by the stop command?

In question: Need code examples on how to use org.junit.platform.launcher.listeners problems have been resolved: Exit – program interruption Pause (true) – stops work before receiving Pause (false) ...
DinaD's user avatar
  • 13
0 votes
1 answer
227 views

Need code examples on how to use org.junit.platform.launcher.listeners

I run according to the documentation with a test class with 30 tests inside org.junit.platform.launcher.Launcher I have a function launcher.registerTestExecutionListeners(listener) registered in org....
DinaD's user avatar
  • 13
2 votes
3 answers
295 views

How to validate if .txt file format is correct as a part of File processing in Automation framework?

In my Selenium+Java automation framework, I need to open a .txt file or any other extension file and then see if the text is in a particular format. Now, I need to see if all lines are in this format ...
test0023's user avatar

1
2 3 4 5
30