Questions about testing applications written in Java, a popular programming language and runtime environment which allows Java programs to run unchanged on most hardware and software platforms.

learn more… | top users | synonyms

0
votes
1answer
127 views

Selenium with Java to scrape data from website

I am trying to scrape data from a site I did code for. I want to scrape data on button click event but when I run my program it throws an exception Exception is: java.lang.NoClassDefFoundError: ...
1
vote
10answers
2k 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.
1
vote
1answer
68 views

Selenium opens browser and loads page, then stops

Selenium opens browser and loads page, then stops. I have inherited a selenium project with no internal documentation and I'm a bit stuck on how to get it up and running (I am new to Selenium). We've ...
0
votes
1answer
58 views

Android / Java Unit-Testing Clarification

While looking up for unit testing for Android applications, I came across a lot of voices over how it is difficult to test-unit an Android app. For example: Dependency issue - why is this a problem ...
0
votes
3answers
493 views

Robotium How to click or enter or select a file in Downloads folder on android device to open options

Robotium How to click or enter or select a file in Downloads folder on android device to open options as (Gallery, Image Gallery, Photos, ...) Here is my code: String filepath = ...
0
votes
2answers
3k 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 ...
0
votes
1answer
325 views

How to come out of for loop in Java

How to break out of for loop when using this code? (utilizing webdriver) public class MonthBooking_SkipStaff { public static void main(String[] args) { driver = new ...
2
votes
2answers
117 views

How do I compare the performance of two .toString() methods?

Say I want to compare the performance of Java's StringBuilder.toString() with new String(char[]) for strings from one to 3000 characters in length. I do know beforehand how long the resulting string ...
0
votes
3answers
60 views

Validating HTML code

I am testing a class that takes 1 string and generates an HTML page around that string. So I pass it the string Math and it returns to me a whole HTML page as a string containing that Word and with ...
0
votes
1answer
38 views

Using Jtidy to parsing HTML

I am using Jtidy I pass an InputSteam and then I tried to validate whether or not the XHTML code in the InputSteam is valid. InputStream s = new ...
0
votes
0answers
64 views

Testing ExtJS UI with WebDriver

Our Web app is using ExtJS framework for rendering UI. However, ExtJS-rendered UI is hard to test automatically because: For most clickable elements, ExtJS uses generated ids like "ext-gen-345" ...
0
votes
2answers
443 views

Selenium WebDriver with Java: How do I read username and password from an excel file to Java to use in website testing [closed]

I am using Selenium WebDriver with Java. I have an Excel spreadsheet with two columns, one for username and another for password. I need to read those values and use them to create new users.
1
vote
1answer
372 views

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

I Just wanted to know, that how we can take a series of screenshots / a video recording for a screen using Selenium 2 / Web Driver with JAVA ? Please provide the answer or the lick where I can get ...
0
votes
2answers
5k views

Error upon starting Select server “Could not find agent library JVMHOOK”

I am attempting to run the Selenium server for the first time on my machine and am receiving an error when running the jar, or when attempting to find the java version. Here is the error: ...
0
votes
2answers
69 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 ...
3
votes
1answer
460 views

Parameterized JUnit tests with HtmlUnitDriver leading to test termination

I came across an unusual issue with my automation tests while using the HtmlUnitDriver. I have been using the junit parameterized class to iterate over a list of urls to run some of my tests. The test ...
0
votes
1answer
181 views

Recent comparisons of Java mocking frameworks?

I'm trying to find recent comparisons of Java mocking frameworks but all of the ones I've seen are quite old. Can anyone point me to something relatively recent? Thanks
0
votes
1answer
36 views

dragAndDropBy() function Encountering Exception

I am a beginner in Selenium and m trying to automate the drag and drop functionality. But everytime I am trying to execute the dragAndDrop() functionality, Eclipse is Giving off Exception. PF the ...
5
votes
4answers
2k 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: ...
1
vote
1answer
174 views

selenium wget download file

I'm testing a web app with Selenium and I actually need to download a txt file during my test. But this seems impossible because a pop up appears asking to save the file. So, this blocks the progess ...
1
vote
1answer
83 views

Is it possible to group java selenium tests in a larger utility class for reuse?

So say you have a made up flight booking application. I'm speaking on a very high level; because i'm more concerned with the design of these java objects. We're creating tests that have these classes ...
1
vote
1answer
194 views

How to access element inside iframe in Java?

I want to get an element's id attribute that is inside of an iframe through Java. How do I access an element inside of an iframe in Java?
2
votes
2answers
333 views

Where I can get all the commands related to Web Driver / Selenium 2

I am not able to find all the commands for Web Driver / Selenium 2. Please help me providing the same. Thanks
1
vote
2answers
129 views

Java Unit Testing Completeness Indicator Tool?

I am talking about the real 'Test Completeness', not the traditional 'Code Coverage'´╝îbecause Code Coverage is not very helpful when people start asking for more accurate estimations. And by 'Test ...
1
vote
5answers
382 views

How to locate the X-path of an element in eclipse accurately?

I am working in a project in which automation is done using Appium Tool.I felt bit difficult to track the X-path of an Image or Textbox in Eclipse while scripting.Sometimes the X-path will be given as ...
4
votes
1answer
425 views

Watir WebDriver in conjunction with Java [closed]

Is it possible to use Watir WebDriver in conjunction with Java? I have to execute some Java methods for dealing with data in DB in order to simulate different situations and test website UI using ...
1
vote
2answers
76 views

Assertions and Outputting Specific URLs

Here's what I've done so far. @Test public void test() { String[] list = {}; for (int i=0; i<list.length; i++){ driver.get(baseUrl + "/" + list[i]); boolean ...
0
votes
1answer
289 views

Using Selenium webdriver with chrome browser - Junit or java - how to upload a file from desktop(or any folder in pc) to application [duplicate]

Using Selenium webdriver with chrome browser for automation - Junit or java programming - how to upload a file from desktop(or any folder in pc) to application
3
votes
2answers
150 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 ...
4
votes
2answers
192 views

Can I (in Eclipse/java) automate the logging of all enters and leaves into or out of all functions, including library ones?

While comparing the run of my wizard and a similar standard one, I have to check all entrances into all functions for both cases. Is there some tool that can automate the process? I can't do it by ...
0
votes
2answers
258 views

As to improve the Selenium 2 test speed?

I'm trying to create Selenium tests to my Java application, but each test spends about 5 seconds to execute. The most time consuming part of the test is to initialize the Selenium. I'm initialize the ...
0
votes
0answers
2k views

Webdriver : How to switch to a specific window?

I came across many solutions for switching between windows, one of them is: Set<String> allWindows = driver.getWindowHandles(); for(String currentWindow : allWindows){ ...
2
votes
1answer
1k views

Selenium Webdriver code in Java to search hidden Objects in Web Browser

I am trying to create a Selenium Web driver java code where I can find all the hidden objects on the webpage and can be accessed. I want the count of all those hidden objects. Which property I can use ...
1
vote
5answers
3k 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 ...
0
votes
0answers
252 views

WebDriver API:how to pass session values in webdriver?

I am testing my web application using selenium webdriver. I write code using java. I am having a problem - I am testing usercreate screen to save user details, but I get problem is some userid etc.. ...
4
votes
5answers
5k views

How to handle self-signed SSL certificate error in IE8? (Selenium Webdriver + Java)

I am literally stuck to this problem for two days now. Scenario The website that needs to be tested has a self-signed certificate. So Internet Explorer (8 in Windows XP) shows "The security ...
3
votes
3answers
3k views

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

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 ...
0
votes
1answer
2k views

How to Check my pc is having internet connection using java [closed]

I need to find whether my pc is connected to internet using java.From references, I found that using below code just verify whether NIC is up or down. public static boolean ...
4
votes
2answers
1k views

Issue with losing focus of “hover” command when the mouse is outside of the active window

If I automate mouse actions using Selenium2/Webdriver in combination with Firefox 12, I can easily get the "mouse" to move to and hover over a context menu so the sub-menus are seen. However, if I ...
2
votes
1answer
4k views

Selenium WebDriver | Unable to switch to apparent pop-up

I am trying to automate Peoplesoft 9 based Web application on Firefox 20.0.1. On clicking a search icon another form opens which I thought to be a pop-up and tried my code - ...
3
votes
1answer
295 views

Testing EJB based web service - Java vs .NET vs SoapUI

I am testing a workflow application that takes the user step by step through each task. The inputs in each task are basically just barcodes or some numerical values. Fortunately, each task has an EJB ...
2
votes
1answer
3k views

Selenium Webdriver | Unable to locate element error

I am trying to run the below code but getting error. Can you please point out the issue? import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.Keys; import ...
3
votes
1answer
2k views

How to get XPath of a list element generated by AJAX?

When I type a keyword ("Documents 1.xml") driver.findElement(By.id("documentSelect_enter")).sendKeys("Documents 1.xml"); in this field: <input id="documentSelect_enter" type="text" ...
5
votes
1answer
5k views

“java.lang.NoClassDefFoundError” Error when running Selenium RC script

First of all I have recorded the script in Selenium IDE, then exported into the junit4 (RC), then copied the junit4 (RC) code into Eclipse IDE. When I run the project with junit test, I found the ...
3
votes
3answers
1k views

Handling popup with many buttons using Selenium webdriver

I'm using Selenium web driver with Java language. When there are two buttons in a popup i.e. ok and cancel , it can be easily handled with web driver using the following code: Alert alert = ...
1
vote
1answer
1k views

Is Selenium 2 WebDriver JavaDoc API available offline?

Can I get a offline copy/archive of Selenium Webdriver Javadoc API which is available here so that I can bind the same to my Eclipse IDE for offline use? A ready-made HTML archive will be ...
2
votes
2answers
143 views

Dynamic whitebox testing and coverage metrics for Java systems?

What coverage measures/metrics are useful for unit testing and for integration testing of Java or other object-oriented systems? Context: We would like to establish a better test process. Our ...
2
votes
3answers
2k views

Unable to get Selenium Web Driver running with Java

I tried running the following code to start running Selenium WebDriver on Java, using the following code import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import ...
1
vote
1answer
130 views

Unittesting GUI. MVC model. When to move data to controller

I've been reading different opinions about how to unittest GUI in Java and it is clear that the best approach is to design the code in a MVC model, in order to be able to test everything. Anyway I ...
1
vote
2answers
963 views

FileUpload using selenium RC and java

I am using Selenium RC and Java and I need to automate the file upload feature.I tried a lot, Clicking on Browse button is not executing and rather getting stuck. I tried in FireFox but to no avail. ...