Stack Exchange Network

Stack Exchange network consists of 174 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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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.

0
votes
0answers
4 views

How do I get the value from array?

I am fetching data from database, now I need to get each row by value. If I take get(0)-- it is printing first column data for every row... [[Field Goal Missed, Jump Shot, 0 Drew Gooden, , , 12.5,...
-1
votes
1answer
8 views

How to Reorder elements in a list of webelements

I have a list of WebElements as List<WebElement> element = ul.findElements(By.tagName("li")); I need to reorder the webelements present in the list. How can achieve this? After reordering ...
1
vote
2answers
52 views

Fetch data from database and put into arrayList

I am automating my gui app. I am fetching the data from database here data contains 6 player and their position..and now I need to store all the data into arraylist... I need to store all the data ...
-1
votes
3answers
38 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 ...
-2
votes
0answers
17 views

An error occurred while I using testNG

SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/home/huang/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.5/log4j-slf4j-impl-2.5.jar!/org/slf4j/impl/...
1
vote
0answers
20 views

How do you get Jenkins to count the build run as pass when failed testng tests are retried and passes? [duplicate]

How do you get Jenkins to count the build run as pass when failed TestNG tests are retried and passes? Description: I have two tests that ran. Test1 passed, but Test2 failed then on retry it passed....
1
vote
0answers
12 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 ...
0
votes
1answer
24 views

Is it possible to define set [ i ] in java and extract i th row from excel to that set? I checked this a lot in net but couldn't find

// Assigning values to set from sheet1 1 st row data from columns 4 and 5 to a listofIntends[1], 2 nd row data from columns 4 and 5 to a listofIntends [2], and so on till // listofIntends[10] ...
1
vote
1answer
56 views

How to select a Combo box , if both having same name?

I am using win app driver tool to automate my application. I am automating a combo box selection . To click the combo box and select the name. But here my GUI has 4 combo box is there, in that 2 box ...
3
votes
3answers
97 views

Taking screenshots using the Java Selenium webdriver

For taking a screenshot in Selenium, does it support only the PNG format or will it also support the JPEG format? Which is the default one image format for taking screenshot in Selenium and ...
3
votes
2answers
56 views

How to improve speediness of automated checking

I am working on Windows automation using the win app driver tool. I am using java language. My app is commentary related software. It is very data-heavy, so I am using a data driven framework. I am ...
0
votes
0answers
16 views

Parallel execution of selenium test cases using Junit 5.3

Junit 5.3 will support paralell execution: https://junit.org/junit5/docs/snapshot/user-guide/index.html#writing-tests-parallel-execution I currently have a suite of selenium test cases using Junit 5....
0
votes
2answers
28 views

Launch FireFox custom profile with geckodriver in java

I'm trying to launch a Firefox profile with add-ons in it, with selenium v3.12 and gecko-driver v2.10 and Firefox version 60.0, how-ever it seems that the custom profile is not working. below is my ...
0
votes
1answer
20 views

Appium + Java + Android + iOS : java.lang.NoSuchMethodError: com.google.common.base.Throwables.throwIfUnchecked(Ljava/lang/Throwable;)V

Question: How to fix : java.lang.NoSuchMethodError: com.google.common.base.Throwables.throwIfUnchecked(Ljava/lang/Throwable;)Vmethods. More info: I observed this error for android as well as iOS ...
1
vote
3answers
62 views

Maximum how many lines in a java class file recommended?

Same question I browsed over the internet but not getting the one point answer. I'am working on Automation Selenium using Java. I have created one class lets say ProductDetailsPage.java so I have ...
0
votes
0answers
29 views

How can we write a Junit testcase for Buffer Reader methods of Java?

I have java code which works as a lexical analyzer. So, we pass some input to the program such as "ABC", 123 and it categorizes them as String or Numeric constant etc. The arguments to be passed are ...
0
votes
1answer
21 views

TestNG + Appium + Java : [TestNGClassFinder] Warning: Can't link and determine methods of class

Question: How to fix : [TestNGClassFinder] Warning: Can't link and determine methods. More info: My Automation is getting failed suddenly. I know it was working well before & even yesterday. ...
0
votes
1answer
48 views

How to store the Excel column data using hashMap

I want to store the 2 excel column data in two variable. then I need to compare the values are matching or not, if it matches then action will perform. I am doing edit operation in my automation ...
1
vote
0answers
44 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 ...
0
votes
1answer
45 views

Unable to get text of an element

I have selenium Test case to validate contents of 2 web pages. The issue, I am facing is I'm not able to get anything from element.getText(). I'm using below code. driver1.get("https://some url"); ...
0
votes
1answer
107 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
1answer
26 views

how to launch firefox geckodriver with add-on enabled in selenium java

I'm trying to use a custom profile in Firefox with an add-on, I can open the profile, launch URL, I even see the add-on icon on top bar but is always set into the disabled mode, I need to set it to ...
0
votes
2answers
42 views

How can I split text from a WebElement into an ArrayList

Here is my code so far. Which gathers all of the data into a WebElement and then adds it into an ArrayList. protected List<String> getDates() { List<WebElement> DateElements = driver....
-2
votes
1answer
113 views

Selecting a second player is not working, while automation

I am automating my app. App is a commentary app. I am selecting 3 players and clicking on their respective positions. Here I am able to select the first player and its position, but unable to select ...
0
votes
2answers
74 views

Need the same set of chrome extensions on browser page running under webdriver

When I run atomated tests with WebDriver using Chrome browser there is only one extension displayed on the page chrome://extensions/ - Chrome Automation Extension: But there some more extensions ...
4
votes
3answers
408 views

syntax for css selector class attribute combination

I have bunch of elements with class X. some elements have class Y also (ie both X and Y) how do I select set of elements only have X with partial class name? below is my example HTML <td class="...
0
votes
1answer
40 views

ImageMagick Compare command issue with version 7

How do you run CompareCmd in Java from imageMagick version 7? The previous versions running compare would run compare, but now in version 7 running compare runs magick compare, which throws error ...
0
votes
0answers
21 views

How to select respective player through excel using winapp driver?

I am doing automation for windows application. I am using winapp driver tool. I am selecting respective players and their position from excel sheet. I want to select 3 players and click on their ...
0
votes
0answers
55 views

Is it possible to pass testng.xml and test name as single parameter in Jenkins?

I have below testng.xml file : <test name="Product_Listing_Page" enabled="true"> <parameter name="scenario.file.loc" value="scenarios/plp.bdd"></parameter> <groups> ...
4
votes
3answers
119 views

What is the difference between Given, When and Then annotations in Cucumber?

I do know that basically all Given, When, Then and And keywords in feature definition technically are not distinguished by Cucumber. But why does Cucumber have different annotations for the step ...
0
votes
1answer
47 views

Selenium Webdriver Java: Setting date on date-picker. Year is not populating in date-picker

I am automating a signup form for web application and there is a date of birth field which has date-picker on it. I am sending values in it by using sendKeys and the problem is that Year is not ...
5
votes
4answers
98 views

How to write unit test for methods with a large number of parameters?

I am asking in case I run into this scenario in the future. Someone in my company wrote multiple methods with 25 parameters. I don't know how/why it got thru code review. I'm just wondering how ...
0
votes
4answers
79 views

Why driver.get() method is not recognized?

I have setup selenium in Intellij Idea. But when tried to create a simple instance it doesn't recognize "get" method. This is what I have done up to now. System.setProperty("webdriver.chrome....
0
votes
1answer
76 views

winapp driver not support web elements

I'm automating my windows application. I'm using winapp driver and java language for automation. I am capturing web elements using UI spy tool. My application is loading, still can't automate the ...
0
votes
0answers
135 views

how to execute batch file of TestNG class of maven project

I am trying to execute a batch script for my testng class of maven project. Can anyone provide a solution for fixing the error? The scenario is When I try to run my Specific TestNG class without ...
1
vote
1answer
44 views

Getting below error while sending soap message to webservice in java. pl help

My code SOAPConnectionFactory scf = SOAPConnectionFactory.newInstance(); SOAPConnection conn = scf.createConnection(); // Create message MessageFactory mf = ...
0
votes
3answers
167 views

How to reuse existing browser session, instead of opening new windows?

I have a feature file which has many scenarios. When I run, every time it's initializing the new browser.It's performing every scenario in the new browser. I am using @before and @after @Before ...
0
votes
1answer
34 views

While reading repository properties file the method click() is undefined for the type Object message is showing

Properties file cannot be reading, it returns error validation message. The method click() is undefined for the type Object Properties obj = new Properties(); FileInputStream objfile = new ...
1
vote
2answers
44 views

How to handle tooltip on onmouseover in selenium java

test case is to show the tooltip message my html code is below <td id="pendingBalance" align="right"> <a onmouseover="displayHelpPopup(this,arrHelp[20][0]);" onmouseout="closePopup();" ...
0
votes
1answer
37 views

Can we use java to design specflows?

I am currently learning regarding specflows to design acceptance testing using cucumber, But I am getting information that we can not use java or Java script programming language only .net is ...
0
votes
1answer
73 views

How to create an Xpath for a checkbox?

I've tried the following xpath but none of them work. The id is listed differently everytime. Next to the checkbox is this word " poetin alfa" - //input[@type='checkbox'][@value='on'] - //*[@id='id1'...
1
vote
3answers
70 views

Multiple @tests but did not execute the priority 2 and priority 3

Can someone let me know why it stops execute after the first @test(priority=1)? It ran the @beforeclass, then @test(priority 1) then @aftermethod. So it skipped @test(prority=2) and @test(priority=3) ...
0
votes
1answer
47 views

How to Create “Runnable jar” testng file for deployment?

I tried: TestListenerAdapter tla = new TestListenerAdapter(); TestNG testng = new TestNG(); List<String> suites = Lists.newArrayList(); suites.add("testng.xml");//path to xml..in src testng....
0
votes
3answers
60 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 ...
0
votes
1answer
86 views

how to drag and drop two elements in the same table ( selenium java)

Both functions works great on its own. But when I put them together. After I drag and drop the first element, I can't drag and drop the same element in the empty table. import java.util....
1
vote
0answers
47 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
3answers
75 views

How to remove ImplicitWaits?

Refrence: Speeding up end-to-end tests I tried removing implicit and I found myself ending up writing too much code for every click and sendkeys etc. I have to put wait condition for every base ...
1
vote
3answers
38 views

Randomise the data for a sign up form

Which is the best/efficient way for a QAE to test the field validations for a sign up form: 1: Do I need to create a util class to randomly generate the data? or 2: Do I need to take hard-coded test ...
0
votes
2answers
44 views

Is it possible to store value, return it and validate in another test case by calling previous method

I have created a method which is as follows: @Test(priority = 61) public void Schedule_Valid_Promocode_Discount () throws InterruptedException { WebElement Discount = driver.findElement(By.xpath("...
0
votes
2answers
66 views

Does One single script can automate entire matches?

I am automating my windows application. My applications are sports related reporter software. In baseball reporter application i will do testing by the following way : I do enter the commentary from ...