Skip to main content

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.

231 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
0 answers
162 views

How to load test video streaming with traffic, internally?

We use centos 6, apache prefork, PHP 5, MySQL, and we have Wowza streaming engine on a different server. Nothing is on the cloud, we have on-premise servers. We'd like to test a couple of things ...
Lynob's user avatar
  • 159
5 votes
2 answers
7k views

How do I disable 'show all' download bar of chrome in selenium

I need to disable 'show all' download bar of chrome in selenium. Because the download bar is showing, UI elements in the lower portion of my page that need to be clicked are not visible. I'm looking ...
sreelakshmi's user avatar
4 votes
3 answers
2k views

How to use Jmeter Xpath extractor for multiple run in dynamic API elements

XPath extractor response assertion passed first run but in second run it is getting failed because <name>pc</name> is not coming in API. How to skip this element if it is not coming in ...
lak's user avatar
  • 567
4 votes
1 answer
308 views

Getting and logging the selenium version used in a groovy project

I'm using Selenium in my Groovy application as a Maven dependency. Now I'm looking for a way to log the used Selenium Version to the console. I tried this: BuildInfo info = new BuildInfo(); def ...
Georg Ritzmann's user avatar
3 votes
0 answers
199 views

How to find frame to given WebElement?

I am writing a Selenium testcase for a webpage which has multiple frames and WebElements. My goal is to get a specific WebElement by xpath without knowing anything about the iframes before starting ...
D. Jung's user avatar
  • 53
3 votes
7 answers
4k views

CLEAR Method skipped while running the tests

I'm writing automation script for a page in which there is a text box. The scenario is as follows: I click on the text box and enter a value which will throw error I clear the text box and add valid ...
Gooner4Life's user avatar
3 votes
0 answers
1k views

How can I make my solution thread safe for testNG parallel execution?

Background: For quite some time I have ran automated tests using forked JVM processes, this proved quite easy when injecting a driver object using spring, I could simply provide the following: @Bean(...
ZKay's user avatar
  • 31
3 votes
0 answers
3k views

How to run Selenium through xvfb? (X frame virtual buffer)

Somewhat specific to Ubuntu, this is towards running this JAR on a server. Running xvfb just hangs for me, so trying to get the syntax properly: thufir@doge:~/.html$ thufir@doge:~/.html$ xvfb-run --...
Thufir's user avatar
  • 367
3 votes
0 answers
304 views

Duplicate annotation Error in appium

I'm working in appium in ubuntu pc. There is a duplicate annotation error in my code public class ChainViewPageObjects { @AndroidFindBy(className = "android.widget.ScrollView") @...
user avatar
2 votes
0 answers
2k 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
2 votes
2 answers
643 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
2 votes
2 answers
1k views

Not able to match ChromeDriver version with chrome version

So at my current job I’m at a pinch, we can’t just download executable jars and use them. We have to request to download whatever we want . So the problem is , our chrome gets auto updated where as we ...
Samian's user avatar
  • 21
2 votes
2 answers
4k 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 ...
Aubrey Fredericks's user avatar
2 votes
0 answers
1k 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....
Cory Smith's user avatar
2 votes
0 answers
335 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
2 votes
0 answers
528 views

decompose an HTML list with page fragments

note: Looking for simplest possible example of PageFactory and fragments. I've been referencing an article which uses additional libraries I wasn't aware of. The desired structure: Where there's ...
Thufir's user avatar
  • 367
2 votes
0 answers
270 views

Image comparision automation and OCR: Two images of different resolutions and one would be a cropped and resized image of the original image

We have a web page which we load inside the Android App and iOS App. the web page is having a header slot and footer slot and a banner slot for the image. When developers attach the URL's of the ...
Siva's user avatar
  • 121
2 votes
0 answers
75 views

Dropwizard metric to send Gauge : Error: Override is not allowed when implementing an interface method

I'm trying the Dropwizard metrics as specified in their website. Below is the code: public class QueueManager { private final Queue queue; public QueueManager(MetricRegistry metrics, String ...
Dinesh's user avatar
  • 291
2 votes
0 answers
3k views

Can't run tests from Cucumber feature.file (cucumber.runtime.CucumberException:)

I can run my tests from my runner class without any problem. Here is my Runner-class: @RunWith(Cucumber.class) @CucumberOptions( format = {"pretty", "html:target/cucumber"}, glue = {"...
SanchelliosProg's user avatar
2 votes
0 answers
450 views

Java + Appium + iOS [mobile] : How to fix error "Error: spawn ios_webkit_debug_proxy ENOENT"?

I am trying to automate web app on iPhone using Mac. Executing webkit debug proxy for automation on iOS platform. I am facing below issue: RUNNING: ios_webkit_debug_proxy events.js:141 throw ...
Narendra Chandratre's user avatar
1 vote
1 answer
832 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
1 vote
1 answer
55 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
1 vote
4 answers
217 views

Window handling in java selenium

Successfully handled the child window in java selenium but the cursor is not moving forward to the password field. My code is below package perfect; //import java.util.Set; import org.openqa....
Bug Hunter's user avatar
1 vote
0 answers
141 views

Capture Google Analytics data from Charles Proxy using automation

Currently we are using Charles Proxy to capture Google Analytics data for our web site testing. Each page we navigate will have a POST created and request data as shown in the attached screenshot. We ...
M Thurman's user avatar
1 vote
2 answers
545 views

Parallel selenium UI test failure rate has increase when compared to sequential execution

Recently I have implemented parallel selenium UI test execution by increasing Jenkins node count and creating multiple Jenkins jobs with different regression.xml files pointing to them. In a nutshell ...
ChathuD's user avatar
  • 2,147
1 vote
3 answers
3k views

Selenium - Click on button in the last row of the table

I have the below script where I have taken the list of WebElement of the number of rows and subtracted with and then click on the Add button. But the problem over here is - script clicking on the Add ...
jay m's user avatar
  • 61
1 vote
1 answer
190 views

Selenium Java best practices for handling different languages and locations, and setting dynamic architecture

Im currently working on a platform that has multi-language options and also the language is defined by IP. So Im trying to build an architecture for testing both scenarios dynamically... The domain is ...
Miki Minoski's user avatar
1 vote
2 answers
1k views

On selecting the radio button how to get the text of the selected radio button where the text is in the next column

On selecting the radio button how to get the text of the selected radio button where the text is in the next column I randomly select the radio button and then i need to Store the selected Radio ...
jay m's user avatar
  • 61
1 vote
0 answers
107 views

how to select the id that is just added and take that id and use it in another screen

My Scenario: I need to create a Demand. After creation the Id of the Demand will be autogenerated I need to fetch that id and use it in another screen Question: While I created the Demand and try to ...
jay m's user avatar
  • 61
1 vote
1 answer
850 views

Unable to run test on gitlab pipeline due to DevToolsActivePort file doesn't exist

I created a sample Selenium Webdriver test using java and maven and pushed it out to my gitlab repository. Then I created a new pipeline to run the automated tests. This is my first time running a ...
na2193's user avatar
  • 13
1 vote
0 answers
265 views

Java Swing MVP unit testing with Mockito

Description I have a simple Java Swing application implementing the Model-View-Presenter pattern. My aim is to be able to test the logic behind "rendering" the view. Here is the presenter ...
Al2110's user avatar
  • 129
1 vote
1 answer
4k views

How to send nested JSON in cucumber as request

I'm trying to send nested JSON through Cucumber data table. I have the following scenario, I have tried Scenario Outline too but it didn't resolve the issue. Scenario: provider edits new ...
Qa Automation's user avatar
1 vote
0 answers
1k views

How to perform mouse hover in selenium java using page object model approach?

I have automated some test cases mentioned at https://www.techlistic.com/2019/08/automate-buy-product-using-selenium.html For second test case mentioned at given link, I have written code for mouse ...
Atif Iqbal's user avatar
1 vote
0 answers
100 views

NullPointerException-webdriver null

I put a screenshot with getDriverInstance. After run. When I run the test, I get this error. At debug it tells me, that the WebDriver is null. Can anyone help me with a solution how to fix the ...
Sebastian's user avatar
1 vote
0 answers
73 views

App crashed when give back action continuously - shared preference error android

I have to do back action continuously, app crashed. It shows: "Attempt to invoke virtual method 'android.content.SharedPreferences android.content.Context.getSharedPreferences(java.lang.String, ...
Karthiga Ganesh's user avatar
1 vote
0 answers
54 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 ...
andres tamayo's user avatar
1 vote
0 answers
84 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....
NikolaS's user avatar
  • 143
1 vote
0 answers
147 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 ...
Cody23's user avatar
  • 19
1 vote
2 answers
10k views

How to read numerical cells without converting to scientific notation (reading excel using Apache POI)

I am trying to read an excel file and validate the values. While reading one of the columns which has decimal values, the digits after the decimal point are not correctly retrieved. Suppose, I am ...
Darshan Patel's user avatar
1 vote
0 answers
1k views

Automation framework for gRPC services

Are there any automation frameworks on Java for gRPC services? For example, for functional testing of REST API could be used Rest-Assured framework. Probably, there are some framework for gRPC
Artur's user avatar
  • 229
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
1 vote
0 answers
386 views

Looking for a java library automate third party Java-Swing application without access to the source code

I'm looking to automate a third party java swing application that my company uses. I don't have access to it's source code so a lot of the swing testing libraries like Assert-J won't work. I'd like to ...
Garrett Leeson's user avatar
1 vote
3 answers
2k views

Mouse hover action to browser window close button

I have a test scenario where the web application checks for the user's leave intent i.e., mouse hovering from the page to the browser close and then a frame gets triggered. Is there any way to do it? ...
Adithya Ram'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
1 vote
1 answer
131 views

Is it possible to make a jar file using Selenium java and Eclipse and run that file on any machine for the testing

I am using Selenium and Java with Eclipse and TestNG. Now I want to make a .jar file for running this test case on another system that doesn't have Selenium and Java. How can this be done?
Muhammad Atif Muneeb Alrai's user avatar
1 vote
3 answers
7k views

Unable to find element with xpath within nested framesets

I'm using driver.findElement(By.xpath("//a[@title='A K T İ V A S Y O N']")); to locate the element given below in the screenshots but getting Unable to find element error. There are nested classes ...
santino87's user avatar
1 vote
1 answer
1k views

How to add row elements in selenium?

I want to add today's count. I am new to selenium, and am not getting how to add using selenium. Can anyone suggest a solution? This is my code: package testpk; import org.openqa.selenium.By; ...
chaitra teppad's user avatar
1 vote
2 answers
1k views

Click getting to lower item (under dropdown) instead of dropdown in Selenium

I m trying to click on the dropdown menu item and i am able to select the dropdown and the menu item but instead of clicking on item the click is going to the element right under it. Before the ...
Twinkle Notna's user avatar
1 vote
0 answers
38 views

Architecture of WebDriver-based GUI tests. How to break base helper into smaller ones?

I create automation tests for web using WebDriver and now architecture is like this: Description: HelperBase.java: contains extended methods for WebDriver which could be used in any project, they ...
Ivan Gerasimenko's user avatar
1 vote
0 answers
54 views

Facing Timeout issue while earlier this code was working

import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; public class Test1 { ...
Ashutosh Singh's user avatar

1
2 3 4 5