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
0answers
10 views

unsatisfied link error exception while fetching data from sql

The following code is to fetch otp from SQL to the frontend import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql....
1
vote
2answers
44 views

convert to selnium java for loop code in python selenium

System.out.println("****************Scrolled down starts****************"); Thread.sleep(2000); for (int i = 0; i < 12; i++) { JavascriptExecutor ja = (JavascriptExecutor) driver; ja....
1
vote
3answers
83 views

How to resolve NoSuchElementException in Selenium Java? [closed]

I've been working on a company project involving Seleniumand I keep getting NoSuchElementException despite putting xpath, cssSelector and linkText. Below is my program. NewCard.java public class ...
1
vote
2answers
25 views

how to send the DB fetched values to frontend using selenium?

I wrote a program where values are coming from sql database.Now i want to send those values to frontend using selenium. say it is an pincode i fetched from Database but now if locate the element where ...
0
votes
1answer
37 views

Web page Not Scroll on mobile using java

I try to scroll two pages of website on mobile but one page is working fine but 2nd page is not scroll on mobile. Both pages working fine on window. Please suggest me how to scroll 2nd page. Below is ...
0
votes
2answers
20 views

Unable to get the list of elements to select a text from the auto-complete text box using Selenium WebDriver

I am trying to enter a keyword to an auto-select box and select the specific text that I'm passing from the populated list. Keyword: text_customer Text needed to select: Constants....
0
votes
0answers
38 views

Appium - 'POST /element' cannot be proxied to UiAutomator2 server because the instrumentation process is not running

I am trying to run an automated test in appium, what happens is that the app does get launched however fails to perform any action. Please see error below: An unknown server-side error occurred while ...
1
vote
1answer
225 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 ...
0
votes
0answers
7 views

In Eclipse only, Cucumber feature steps are not getting recognized with step definitions [duplicate]

This is my runner class: @RunWith(CucumberWithSerenity.class) @CucumberOptions(features = "src/test/resources/features/" ,glue={"stepdefs"} ,dryRun=false ,monochrome=...
0
votes
1answer
34 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 ...
0
votes
1answer
27 views

Trouble reaching a text object in DOM with selenium (java)

I have the below element in the page I am currently testing: <li> "At least 4 of the following rules must be satisfied:" <br> "Password should contain at least 1 upper latin ...
0
votes
1answer
161 views

Why is my Feature File failing to find the Step Definition?

I have the following Feature File which is grayed out so I cannot run it from an IntelliJ Run configuration, nor from the right click context in the Feature File, though it runs fine from the Run.java ...
0
votes
1answer
59 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 ...
0
votes
0answers
21 views

Selenium ide Java generated code does not scroll

I am trying to automate a test suite by using selenium IDE, the idea its to generate the tests with the IDE and then export them to a java/jUnit format. The problem its that the the tests generated in ...
0
votes
1answer
57 views

Unable to run tests on edge using WebDriverManager with Selenium

My framework is based on Selenium + TestNG and for the binary management we are using Webdriver Manager (Boni garcia). I'm using MacOS Catalina 10.15.7 I can execute the suite on edge using a third ...
0
votes
0answers
7 views

having an error in pom.xml file from a cloned repository in eclipse from a bitbucket branch

this is my first time making a cloned repository in eclipse and using eclipse. i am having an error on my pom.xml file in this line: <project xmlns=*"http://maven.apache.org/POM/4.0.0"* ...
0
votes
0answers
42 views

Click does not work selenium java

I have faced a critical problem in my work. I have passed 2 days but can not solve it. I have used several options but not working in automation but working in manual processes. I know I am wrong but ...
0
votes
1answer
58 views

File download verification with selenium and java

So I read all the other stackoverflow topics about this, none of the solutions worked for me so lets see if someone can help me. I need to verify a download (csv) from an export button in chrome(...
0
votes
0answers
29 views

Cannot choose and click specific value in the table

Whatever companyCode I specify in the method it always chooses 3M Canada. Before it worked perfectly but after a few days it stopped even if I didn't do any changed in the code. The XPATH of the table ...
-1
votes
1answer
38 views

Error in Launching 2 chrome browsers using MultiThreading and perform same functionality simultaneouly

I am trying to launch two chrome browsers Simultaneously using Selenium ad cucumber, and perform same operations using multiThreading, but on one browser, operations get complete, whereas on another ...
1
vote
1answer
51 views

Selenium test coverage visualization

We have a huge legacy application where unit/integration tests are impractical and most automation is done in Selenium with Java programming language in a separate automation project. There are about ...
0
votes
1answer
23 views

Unable to perform the vertical scroll up to the web element

I want to click on a web-element and perform some action. For that, the element needs to be visible. I have written the below code: WebElement element = driver.findElement(By.xpath("//div//span[@...
2
votes
1answer
259 views

Using 'final' variables in Java Selenium tests

This might be considered a programming question, but it is concerning test code, written in Selenium plus Java, so I think this is the relevant site to post this. When viewing other people's tests ...
0
votes
1answer
30 views

Not printing lowest price value using selenium

Not printing lowest price value using selenium webdriver and java language on Makemytrip application here I am able to print the all prices, but problem in number format. //print lowest price List&...
0
votes
1answer
66 views

Selenium + Java: How to automate custom file upload/attach field?

I'm trying to automate a custom file upload field with SELENIUM and JAVA on UBUNTU. Let's take Yahoo mail as an example. The flow to automate would be to compose an email, attach a file to it and then ...
0
votes
1answer
27 views

Getting an error while trying to run a script using Rest-Assured library

Getting an error while trying to run a script using Rest-Assured library along with Selenium. Anyone has encountered this kind of error while scripting with Rest-Assured. My code is scattered across ...
0
votes
1answer
28 views

How to select/click respective row within a table? There are a few tables on the page [closed]

there are a few tables on the page. In one of them I need to select respective company code and then proceed. I have a problem with the following code. I don't know what approach should I use and if I ...
0
votes
0answers
18 views

I have automated Soap request via Rest Assured code, but its written that Rest assured API can only be used for rest service [duplicate]

Here is my code public class xmlreq extends TestBase { @Test public void buildRequest() { logger.info("starting"); RestAssured.baseURI="http://webservices.oorsprong.org/...
0
votes
0answers
58 views

Selenium: How to switch to tab without focusing?

I'm using the Java Selenium and Chrome webdriver on Windows 10. I like to have a GUI up for debugging purposes, but my code keeps bringing the browser into focus. Specifically, lines like driver....
1
vote
1answer
33 views

Writing requirement for specific Java (JRE) version

The system in which our application must run has a specific version of Java Runtime Environment (JRE) installed and it may not be changed. Therefore I have written a system requirement for my team, ...
2
votes
1answer
187 views

Difference between Selenium getText() method and innerText property of an element

I am trying to get the text of an element using Selenium getText() method and using innerText property of an element and compare the output. HTML code: <div> <h1> DEF <p> Demo ...
0
votes
1answer
205 views

Shows “[Utils] [ERROR] [Error] java.lang.NullPointerException” for data driven(excel File) API Automation test(Rest Assured)

It throws a java.lang.NullPointerException, but why it shows that, I could not find. Here is my code. ExcelUtil package Utils; import java.io.FileInputStream; import java.io.FileNotFoundException; ...
0
votes
3answers
50 views

How to Verify Previous Month Arrow should not present in Current Month in GoIbibo Site

I am unable to Verify Previous Month arrow should not be present in DatePicker but as it is not present in DOM getting Exception unable to find Such Exception. void fillDepartureDate() { // Date ...
1
vote
1answer
35 views

Fetching wrong Employee count corresponding to office location in Selenium

I am fetching Employee count according to locating using Map Highlighted No of employees count is mismatch in Image like If i search in Web table Tokyo there count is 5 but here getting 6 for ...
1
vote
0answers
21 views

How can I solve “ERROR k.a.j.j.JMXMonSampler: The client has been closed” in JMeter after installing SSHMon Sample Collector in JMeter?

I have a problem regarding running jp@gc-Graph Generator plugin more than two times in my TestPlan in JMeter. I get following stacktrace in Log Viewer panel : 2020-08-25 17:23:29,114 INFO o.a.j.e....
0
votes
1answer
174 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 ...
-4
votes
1answer
123 views

Selenium with React dropdown

I am bit stuck on how to automate a dropdown without select tags and select desired values by text/name HTML Code is below <div tabindex="0" direction="ltqr" class="reacst-...
1
vote
0answers
34 views

Unit testing a native sql query

The project in question runs on Hibernate 5.4 for persistence, against MySQL when deployed. Unit tests are ran during the Maven build. I'm in the process of doing a feel-faster optimization. As such, ...
0
votes
1answer
149 views

Scrolling using UiScrollable stops in the middle of the screen

I am trying to scroll down to the bottom of the screen to a UI block using UiSelector class but it's not working as expected. Basically, when I run the code it does not scroll all the way to the ...
0
votes
2answers
106 views

testing with loops

I have a test case that is looping 400+ times with different inputs from the excel spreadsheet. Currently, this is one big test case and I want to make different test cases with the same loop. Is this ...
1
vote
0answers
35 views

Is each Scenario in Cucumber BDD framework considered a separate .Java Class by JVM?

When I write Cucumber scenario's like:- User.java Feature File Scenario: Add a new user profile Given User is on the Add user profile page When user enters profile information and clicks ...
0
votes
1answer
122 views

How to split data passed from a .CSV file to a TestNG DataProvider

Given my .csv data file in format name:reference :- Johnson;464758, Smith;839393, Jones;940392, Davidson;182939, Arthurs;938494 And given my test code: final static String DELIMITER = ","; ...
1
vote
1answer
137 views

Getting error - …either make it static or add a no-args constructor to your class

I am writing test scripts with Rest-Assured java. I have two classes ApiMethods and AppMethods belonging to one package and another test package called apiTests using the methods created in the ...
0
votes
0answers
415 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. ...
-1
votes
2answers
82 views

NullPointerException on WebDriver using POM and Page Factory

I'm getting a NullPointerException on the Registration and BasePage classes for the driver variable. In BaseTest, I initialized the Webdriver with ChromeDriver and in the RegisterTest, it extends the ...
0
votes
0answers
17 views

downloaded pdf file in internal Shared storage in mobile android device

Here after downloading a file in chromebrowser in mobile I'm trying to check that filename is present in Internal shared storage downloads folder in mobile but it is showing null exception. How to ...
1
vote
1answer
173 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 ...
2
votes
2answers
201 views

Get class name of the calling class

I needed to get a class name from my calling class. I will not make too much confusion. I have 3 classes . Class A{ //do something } Class B extends Class A { @Test(dataProvider = "dp&...
1
vote
2answers
1k views

How to use proxy with authentification in Selenium with Chrome WebDriver?

After hours of research I am still not able to use a proxy with authentification (username, password) in selenium using chrome WebDriver. Here is what I tried: using a chrome extension -> not ...
0
votes
2answers
511 views

How to use Selenium to select an option from a React JS drop down with div tag/class?

I have tried all the possible things. also, tried searching over tried different combinations and variations. I can get the element clicked which opens the dropdown. but i am not able to select an ...

1
2 3 4 5
25