Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

2
votes
0answers
88 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 ...
2
votes
0answers
492 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(...
2
votes
0answers
226 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") @...
2
votes
0answers
1k 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 ...
2
votes
0answers
1k 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 = {"...
2
votes
0answers
240 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 ...
1
vote
0answers
34 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 ...
1
vote
0answers
45 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 { ...
1
vote
0answers
37 views

how to enable assertions through the Gradle Kotlin DSL?

The simplest possible assert usage I could think of: thufir@dur:~/NetBeansProjects/helloAssertions/src/main/java$ thufir@dur:~/NetBeansProjects/helloAssertions/src/main/java$ ls App.java thufir@dur:~...
1
vote
0answers
58 views

Unable to call custom annotation in selenium test

Unable to call custom annotation in selenium test i am writing a Apache poi selenium junit test - To avoid @RunWith i have tried myown annotation public class MyTest extends OtherTest { String a ;...
1
vote
0answers
48 views

Record UI elements for TestFX

There is an existing JavaFX based application, which I should write automated tests for. I just started to use TestFX(version 4.0.13-alpha) and looking for advice, how to record and identify UI ...
1
vote
0answers
364 views

How to handle password alert pop up (Windows Security) on IE?

The pop up is not the traditional alert. It looks like this pop up. Basically Windows Authentication system. I have tried the classical alert handling technique (alert.sendKeys()) and the one using ...
1
vote
0answers
263 views

how to interact the video in java selenium

I have a test case with video. Test Case scenario: There I want to check whether the link in the website and when we clicked that link played video link are same. [![Highlighted is linked to video][...
1
vote
0answers
315 views

Unable to Switch to iframe in IE

Code Trails: driver.switchTo().defaultContent(); List<WebElement> before = driver.findElements(By.tagName("iframe")); for (WebElement t : before) { System.out.println("iframe" + t....
1
vote
0answers
320 views

How to control order of testNG package test execution without Priority or Dependency?

I have a package containing the tests I want to run. There are no priority or dependency setings at the testcase or suite level. <suite thread-count="1" name="reg 1"> <listeners> ...
1
vote
0answers
1k views

Casting jQuery.active from the executeJavaScript method

Working in an inherited automation code base. There is a method which waits to see if jQuery has been initialized. .until(new Function<WebDriver, Boolean>() { @Override ...
1
vote
0answers
144 views

Get error (Illegal query expression: must be surrounded with curly brackets) while trying to fetch details about test-set in QC ALM Rest api

I want to update the test results of Cucumber test scenarios to QC ALM using Rest API. I have individual test-set for all automation test scenario (There is a 1-1 mapping between automation test ...
1
vote
0answers
393 views

How to extend Selenium2Library by creating new RobotFramework keywords using Selenium WebDriver in Java?

I'm trying to extend the Selenium2Library python library (1.8.0) by implementing new Robot Framework keywords using Selenium WebDriver in Java. In order to do that, I need to be able to retrieve the ...
1
vote
0answers
265 views

When exporting from Selenium IDE to Webdriver, some commands are not getting exported. Its coming as “Unknown Command”

driver.findElement(By.linkText("Add User")).click(); // ERROR: Caught exception [unknown command [readCSV]] // ERROR: Caught exception [unknown command [while]] // ERROR: Caught exception [unknown ...
1
vote
0answers
2k 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 --...
1
vote
0answers
78 views

How to extract adb dumpsys response for validation?

I need to validate few status of the android device. Can any one let me know how to extract the information from adb dumpsys and validate the responses using Java. Your help is much appreciated. Ex: '...
1
vote
0answers
160 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 ...
1
vote
0answers
51 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 ...
1
vote
0answers
253 views

Running a Cucumber test runner without executing the tests

One of the Cucumber options is to create a .html report or .json file of the features being run in a given test. Every time you execute a test run, it runs through the tests and at the end of a run ...
1
vote
0answers
820 views

Specifying and running multiple goals in Maven

I have created a testing framework using Cucumber, Selenium and Maven. I am using the cucumber-jvm-parallel plugin to run my tests in parallel. Below is how my pom.xml looks: <?xml version="1.0" ...
1
vote
0answers
320 views

how to use javascript in selenium for get data from excel

I am using selenium for data entry there are some drop downs in my web page I use dropDown.selectByVisibleText(input.getCellData(i, 0)); for every one but after first drop down it is not working ...
1
vote
0answers
342 views

Downloading PDF files using PDF Box

I have a page with 3 links, all PDF files. They all refer to the same directory but to different files in that directory, all of which are pdf files (ending in .pdf). Manually clicking on any of ...
1
vote
0answers
332 views

Appium + Java + Android + Mobile browser [Chrome driver] : How to switch from android app to mobile browser?

I am automating android app. My env is - Mac, Appium, Java + TestNG Scenario: Click on button Its will redirect user on mobile browser Login in browser How to automate above scenario? The core ...
1
vote
0answers
55 views

How to get the name of all the test methods and functions in a test?

I am developing a framework where I need to do the reporting of my tests. I have to do this from scratch with out using junit or testng. I need to create a custom annotation @Testing and write a test ...
1
vote
0answers
498 views

How to perform drag and drop on an Image Map Area element?

I am trying to automate an HTML webpage which requires me to drag an image map area element by 50 pixels to the right and then release the click. I tried various techniques, like using an Actions ...
1
vote
0answers
260 views

Selenium EventFiringWebDriver in page object model and refactored

I'm struggling with this one, how to implement EventFiringWebDriver (e_driver) without having a lot of repetitive code. As I'm understanding it, in order to capture finding elements and acting on ...
1
vote
0answers
71 views

Accessing Data from Tables

I want to check if my entered information is inserted into the list in the table of the html page but working with tables is a little bit more difficult than a normal list. Could someone help me? My ...
0
votes
0answers
32 views

Selenium Webdriver - Toggle switch click is not working

I suppose to test toggle switch element to on and off, but while sending click to the element I am getting Clickable element not found error. I have corrected my code with chain action and JavaScript ...
0
votes
0answers
26 views

JUnit 5 integration tests for WSL Ubuntu 18.04

Context In order to write integration tests that verify whether running a compiled project.jar file yields the desired results, I thought of doing: Execute a J-unit test that substitutes certain ...
0
votes
0answers
24 views

Code is not being executed once being tried to come back to parent window

My test case is about opening the child window by pressing the button located on main window and closing the child one and after that, i have to press another button which is in parent window but i ...
0
votes
0answers
52 views

Getting Cannot instantiate class error

package com.crm.qa.test; import org.testng.Assert; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import com.crm.qa.base....
0
votes
0answers
11 views

Error shown when trying to put dropdown list values onto Excel sheet using Selenium WebDriver & Apache POI

Scenario :- I have an HTML File that contains a drop down list containing some values in it. I need to add the values of dropdown list onto Excel sheet using Selenium Apache POI. I have written ...
0
votes
0answers
20 views

Extent Report : [TestNG] Reporter x.x.ExtentReportListener.ExtentReport@afc191 failed java.lang.NullPointerException

Getting nullPointer exception in extent report . Help me on this issue unable to trace the root cause Using extent report 2.41.0 Here is the my log: [TestNG] Reporter com.psiexams.base....
0
votes
0answers
20 views

Determine Element type in Jubula Client API

I have to test a JavaFX application and to keep coherence with the existing automation framework I want to create a WebDriver Protocol conform driver API. Now I get the problem that elements within ...
0
votes
0answers
37 views

How to remove keys from rest-assured ValidatableResponse and assert response with constant json string

In rest-assured test cases I am getting mentioned 'ValidatableResponse response' where I want to remove keys such as "updated_at", "deleted_at", "created_at" and "notice" and assert this object with ...
0
votes
0answers
17 views

How to remove keys from response json and hold remaining json data in an object using java 8 lambda expressions for rest assured test case

In REST-assred test case I am getting ValidatableResponse body as mentioned from which I want to remove notice, created_at, updated_at and deleted_at keys using java 8 lambda expressions and assert it ...
0
votes
0answers
45 views

Code can't be executed after running click method

After being run click function , i don't know why but the next sendKeys function can't be executed. eclipse is getting stuck and after a while, i'm facing with "timeout waiting for page to load" error....
0
votes
0answers
21 views

How to identify the fields and their values in the listview screen which are inside a recyclerView

I am automating a Mobile screen where I have the details of a particular transaction, in which I have fields(fieldnames like card number, transaction date, Transaction ID., etc.) and the subsequent ...
0
votes
0answers
35 views

I'm facing with “timed out waiting for page to load” error although screen is already loaded

After pressing search button by typing number, a table including just one row related to data that i searched is being displayed on same page and i have to press in the another button which is located ...
0
votes
0answers
58 views

getting null pointer exception for different step definition files with cucumber and selenium

Browser utility: package com.gmsr.utility; import java.util.concurrent.TimeUnit; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class BrowserUtility { ...
0
votes
0answers
67 views

Selenium firefox driver can not install firefox extension

When runnig jmeter on the Linux OS from GUI mode it fails. The part of log file is below org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(/usr/bin/firefox) on port ...
0
votes
0answers
42 views

Not able to Click on the Drop down and wait for element also fail for drop down ID in IFrame with JavaScript

I am unable to click on this drop down. I tried select drop down also and javascript click also normal click also.& wait for this element become also fail. Please provide the solution for the same....
0
votes
0answers
481 views

How do I fix the error “ Message: Error: Polling for changes failed: NetworkError when attempting to fetch resource” in firefox

I'm always getting the below error when I run my automation suite. I need to fix that error because it fails some of my tests when the browser is loading. console.error: BroadcastService: ...
0
votes
0answers
56 views

Best testing tool for Firebase

I need a tool to write an automate test for Firebase, which is Google analytics tool, currently, I am using Selenium with Java, we are planning to have also server running on JVM. My question is about ...
0
votes
0answers
37 views

Unable to find element using xpath, css, class showing error

package searchtest; import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; public class betaLogin { ...