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
20 votes
5 answers
10k views

How does one get started with web test automation using Selenium?

So I've been testing web based analytical software now for the past 4 years or so with mostly manual techniques. But for 2015, I've set myself the goal of getting setup and start writing automated ...
Keva161's user avatar
  • 365
6 votes
1 answer
23k views

Unable to scroll down to bottom of div with data loading dynamically

<div id="findingTblBody" class="tablebody" infinite-scroll-distance="2" infinite-scroll="loadMoreData()" style="width: 819px;"> I want to scroll to the bottom of div mentioned above. I am ...
Pratiksha Jadhav's user avatar
-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 ...
12 votes
5 answers
5k views

Looking for open source, Java-based tool for performance testing

Goal: I have an enterprise application written in java to test for performance. I need to do it separately, so I will be basically simulating a user interaction over http/https. My findings: ...
Tejas's user avatar
  • 221
0 votes
5 answers
11k views

How do I get particular textNode value of a DOM with Selenium

Hello I am trying to find Load # detail from this site. Also You can refer screenshot too. I have tried with xpath: //div[@class='equipment_item']//text()[preceding-sibling::strong[text()='Load #:']][...
manish kumar's user avatar
9 votes
5 answers
19k views

How to connect Selenium to an existing browser that was opened manually in java or create semi automated tests?

I want to achieve some use cases in which: I want to perform some tasks that require manual intervention before kicking in automation execution. For instance, I need to manually launch the browser, ...
Denish Makwana's user avatar
7 votes
17 answers
58k views

Should I learn Python or Java to get into test automation? I am new to programming

Should I learn Python or Java to get into test automation? I'm new to programming. Please share your thoughts or links to any useful information.
pythonjava's user avatar
5 votes
1 answer
9k views

How to Use Http Request/JSON extractor(using Jmeter Variable) in Jmeter with Response assertion(using Jmeter Variable)

How to Use Http request/JSON extractor(using Jmeter Variable) in Jmeter with Response assertion(using Jmeter Variable). better to provide with Example?
lak's user avatar
  • 567
3 votes
3 answers
2k views

Chaining WebElement actions

When interacting with different elements and applying multiple actions it may be quite convenient in some situations if we could do: WebElement myInput = driver.findElement(By.id("my-input-id")); ...
alecxe's user avatar
  • 11.4k
0 votes
1 answer
1k views

How to debug NullPointerException in selenium-java

Console FAILED CONFIGURATION: @BeforeMethod setUp java.lang.NullPointerException at com.ecinteractive.base.TestBase.initialization(TestBase.java:50) at com.ecinteractive.testcases....
dhakals's user avatar
  • 11
26 votes
5 answers
55k views

Open source tools for automation of Java GUI application testing

The testing tools (or tools that could be used in testing purposes) for testing Java GUI application I know are: Jemmy - jemmy library contains methods to reproduce all user actions which can be ...
Ivan Gerasimenko's user avatar
17 votes
4 answers
76k views

How FluentWait is different from WebDriverWait?

How is the FluentWait is different from WebDriverWait? I am using WebDriverWait having the polling interval set to : 500 miliseconds. Still, WebDriverWait returns after some delay (i.e. 2 - 3 seconds ...
Dinesh's user avatar
  • 291
10 votes
2 answers
55k views

How to find real world Selenium projects

Where can I find sample or real Selenium projects. All the material I can find on github and on internet are basic, and never intermediate or advanced. How does a real Selenium project look in real ...
Kharbora's user avatar
  • 551
9 votes
9 answers
65k views

What Concepts of Java do i need to learn to use Selenium Webdriver?

I want to learn Selenium WebDriver automation using Java. I have done manual testing before and want to learn automation. I just know the basics of Core Java. Could you please suggest me the Core ...
Drew's user avatar
  • 91
9 votes
11 answers
100k views

Selenium test case fails due to page load time

I run nearly 30-40 test cases twice a day. And everytime some test case fails due to page load time. Infact i have explicitly mentioned Thread.sleep("2000"); wherever i feel it takes more time to load....
kittudk's user avatar
  • 153
9 votes
4 answers
67k views

Downloading a file in Internet Explorer through Selenium

I have to automate a case in which I have to download an Excel file using Selenium IDE.I have done this in Firefox by using custom profile feature which automatically downloads file and saves it into ...
mahF's user avatar
  • 111
8 votes
3 answers
66k views

"Element is no longer attached to the DOM” StaleElementReferenceException when selecting HTML table row

I am using Selenium 2/WebDriver for automation. I have a table and am trying to select a row in it. When the test runs, I can see the row become highlighted as if it is clicked, but then immediately I ...
squeemish's user avatar
  • 1,265
7 votes
4 answers
106k views

Webdriver : How to perform scroll down an element (example div) using selenium?

The Scroll element in the page is actually a div with scroll bound to it. Here is the HTML snippet. <div class="slimScrollBar" style="background: none repeat scroll 0% 0% rgb(137, 137, 137); ...
jass's user avatar
  • 333
7 votes
5 answers
3k views

Page Object Model or External property file for Selenium Object Repository

I am a beginner in Selenium WebDriver (Java with TestNg). I'm trying to create a framework of my own. My question here is what would be the better option to store my objects (basically all the ...
Sagar's user avatar
  • 71
7 votes
7 answers
12k views

I want to learn Selenium but not sure about the language I need to learn for automation

Java or Javascript? or maybe another language? Please help me choose the programming language I should learn for Selenium automation and its benefit over other. Any pro's and con's?
Idris's user avatar
  • 79
7 votes
4 answers
4k views

same xpath on the page with dynamic ID selenium java

I have a problem with the two same XPath with dynamic ID on the same page. I have tested for selenium in java, when I need to confirm button on delete upload file. Instead of this, test first submits ...
Hana Puklická's user avatar
7 votes
5 answers
8k views

Want to switch from software development to testing domain

I have 4 years of experience in software development. But I did software manual testing more than software development. I am good in finding tough functionality related bugs. I have passion for ...
suchi's user avatar
  • 71
6 votes
3 answers
4k views

Use Page Object vs other models for Automation in Selenium Webdriver? [duplicate]

I have been doing automation testing since last 2 years and I am following below ways for any website and mobile application automation testing. Create Global Method class where I implement all test ...
Helping Hands's user avatar
6 votes
4 answers
11k views

Unable to upload a file using selenium/web driver running with java [duplicate]

I have a complicated interface where uploading a file is three step ( The forum is not allowing me to add screenshots of my window so please try to visualise it) step 1 click on browse tab and select ...
user3018's user avatar
5 votes
2 answers
325 views

Isolating defect in distributed event-driven system

Our system takes an object from external system every time the object gets changed (change event), processes it and put it back processed into this external system. So, end-to-end testing is about ...
dzieciou's user avatar
  • 10.5k
5 votes
2 answers
32k views

How to take ScreenShot & save it with different filenames by using Selenium & Java? [closed]

I have created screenShot() method to take the screenshot of the web page. When I used this method in my code first time it will capture the screen and it will save the image with image1 name. When I ...
Bharat Mane's user avatar
  • 6,785
4 votes
4 answers
1k views

How to deal with huge PageObject using POM in Selenium?

I've got a question about dealing with huge PageObject. In the website that I'm currently testing there is a form with circa 50 inputs/dropdowns/selects. In the current state my class got about 900 ...
user36717's user avatar
4 votes
2 answers
4k views

How to avoid the pop up message while downloading an application (.exe) using selenium

I am trying to download an application and check if it's downloaded into my local system or not. But when I click the download link I have a popup with Save or Cancel options, which is stopping me ...
sarath's user avatar
  • 409
3 votes
2 answers
8k views

How to capture a series of screenshots in Web Driver using Java

I Just wanted to know that how can we take a series of screenshots / a video recording for a screen using Selenium 2/Web Driver with JAVA ? Please provide the answer or the link where I can get an ...
Swap's user avatar
  • 123
3 votes
1 answer
14k views

Jmeter Expected closing bracket for IPv6 address at index 28

I am trying to Load test on the link:http://[dot4ap-mms-cr:8080/fms/Kernel/w_login.jsp]/ and getting this error message: Expected closing bracket for IPv6 address at index 28 Please could you help ...
Pilar Brist's user avatar
3 votes
2 answers
2k views

How to select an element from a drop down list inside 'svg viewbox' container using Java/WebDriver?

<svg viewBox="0 0 24 24" style="display: inline-block; fill: rgb(224, 224, 224); height: 24px; width: 24px; transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; position: absolute; right: ...
Punns's user avatar
  • 31
2 votes
2 answers
3k views

Logging every action with custom "debug" method. Good idea?

I'm creating my first full framework using Selenium and TestNG and recently implemented the ability to have logging enabled which will track every action (before and after). public class CustomLogs { ...
Dan Fanelli's user avatar
1 vote
1 answer
433 views

AllureRestAssured , how to ignore logging headers

I am using rest-assured and allureRestAssured for testing api given().header("Content-Type", "application/json") .header("key", key()).filter(new ...
Cod's user avatar
  • 11
1 vote
1 answer
2k views

Verifing pdf using Selenium + Java

How can one verify pdf using Selenium + Java? Until recently, I was verifying pdf using Firefox (making sure that the pdf file wasn't empty). This was nice and working fine, but it's not multi-...
BelovedFool's user avatar
1 vote
2 answers
851 views

i found Null pointer exception while executing testng in selenium

package com.tng; import java.util.concurrent.TimeUnit; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.testng.annotations.AfterMethod; import org....
Hari narasing's user avatar
1 vote
2 answers
21k views

How to resolve NullPointerException error in my below POM code?

I am getting java.lang.NullPointerException while executing my test case , I am using Page Object Modle with PageFactory ,following are the code snippets LoginPageObjec.java public class ...
Hassan's user avatar
  • 327
1 vote
3 answers
264 views

One Selenium framework to rule them all (or an actively maintained collection of frameworks)

I am looking for most universal, up to date, open source, selenium framework for test automation. Or at least a number of frameworks for different languages. I am surprised as how every company and ...
lucasso's user avatar
  • 19
1 vote
2 answers
6k views

Firefox browser opens but URL is not launched

I am working on selenium. I am using linux os. I am using firefox driver for automated testing my app. My firefox version is 53.0.3 (64 bit). When I run the code the Firefox browser open and don't ...
user avatar
0 votes
1 answer
103 views

How to close this dialog

This is the code for an opening specific page and after that popup appear which I am unable to handle. I have used alert, switchTo, etc.. //Open Browser WebDriver driver = new ChromeDriver(); //...
Sufiyaan's user avatar
0 votes
2 answers
3k views

Testing a download link using Selenium?

I have a situation where I have to check the download link to make sure when someone clicks the link download is going to kick off and the product will be downloading, Is there anyway that we can do ...
sarath's user avatar
  • 409
0 votes
1 answer
550 views

Find element within another element using explicit wait

I have the following code: List<MobileElement> messages = driver.findElements (By.id ("body_bubble")); //find all messages MobileElement lastMessage = messages.get (messages.size () - 1); //get ...
LexSav's user avatar
  • 155
0 votes
2 answers
8k views

How to Create "Runnable jar" file for deployment? [closed]

i have one selenium project, i need to deploy as jar file how to do that? i used following tools/api's Selenium Web driver+java poi JXL TestNG AUT Reporter i don't have Main Method. Runnable jar ...
sameer joshi's user avatar
0 votes
3 answers
23k views

Exception in thread "main" java.lang.NoClassDefFoundError

I am trying to do this: http://www.softwareishard.com/blog/firebug/automate-page-load-performance-testing-with-firebug-and-selenium/ Below is the screenshot taken from eclipse package com.stack....
Deepak Nath's user avatar
0 votes
2 answers
11k views

java + log4j : How to fix "No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies)"

Working with selenium + maven project in eclipse. I am facing below warnings: log4j:WARN No appenders could be found for logger(org.apache.http.client.protocol.RequestAddCookies). log4j:WARN Please ...
Narendra Chandratre's user avatar
12 votes
9 answers
4k views

Tools for Server application testing [closed]

I'm currently working (almost finishing) a Java project that consists on a server application and some client applications on the same network, that will communicate with the server only to request ...
9 votes
2 answers
72k views

Navigate to previous page using Selenium

I know there's a driver.navigate().back() but that's not what I'm looking for. Let's say a user is on PageA, they click on a submit button which takes them to a submit page. On that page, there are ...
B. V's user avatar
  • 113
9 votes
1 answer
3k views

PageFactory and nested page objects

In some languages, like Javascript, you can create a hierarchial structure of Elements within a PageObject, like so: class HomePage { loginBox = { usernameTextBox = findElement(By....
Keith Tyler's user avatar
8 votes
5 answers
324k views

How to iterate a list of WebElements and print the values one by one to perform some action

List<WebElement> allLinks = driver.findElements(By.xpath("//div[@class='datepicker']/div/table/tbody/tr/td/table/tbody[2]/tr/td[@class='' or @class='datepickerSaturday' or @class='...
STE's user avatar
  • 749
8 votes
2 answers
26k views

Free/Sample Selenium test suites (code) for Open Source projects

I am a student and for learning purpose I am looking for following: Open source projects who have a ready-made selenium test-suite, free for others to use: can be any sort of web application, in ...
Adi's user avatar
  • 83
7 votes
1 answer
38k views

Fieldlevel validation in Selenium Webdriver (Java)

how to test validations for "FIRSTNAME" textfield. Below are the details and code. URL: http://www.vrlbus.in/vrl2013/register_customer.aspx Special chars: #!#!#$@#!$@!$@#$%#%^#$^^&%&$%* (...
QA4it's user avatar
  • 1,412