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

1
vote
2answers
5k 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 ...
1
vote
3answers
3k views

Handling multiple windows using selenium

Is it possible to work on multiple windows using selenium, when I searched on the net, there are only explanations and codes available for Selenium2 webdriver version. For the normal selenium I can't ...
1
vote
1answer
701 views

Questions on Developing TestNG based automation for Java based web services

• In case of .NET 2.0 ASMX you can post HTTP requests for the web service using HttpWebRequest and HttpWebResponse • Is this approach possible for java based web service as well, referring to ...
1
vote
1answer
95 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 ...
1
vote
0answers
225 views

“session has expired” error - after clicking a button with webdriver in IE8

After clicking a button in my application with webdriver, it gives me “sorry..your session has been expired” in IE8 and i am unable to proceed. But I am able to do it manually. Now to proceed with ...
1
vote
0answers
469 views

Dependent methods in the same class run out of order only when included in a “testng suite”; running class independently respects the dependency

I have a class with dependent methods using the TestNG annotation dependsOnMethods The test runs fine 100% of the time if I simply run it as a TestNG Test from the package. When I include the test ...
1
vote
2answers
132 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 ...
0
votes
2answers
286 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
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 ...
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
1answer
819 views

SSO in Selemium web driver

I am trying to run selenium web driver(Firefox) test cases which will need a single sign on (web). Issue over here is i have to sign in manually with my OTP every time i tear down the test case. So i ...
0
votes
2answers
17 views

Load Testing Options for Clojure Application

I have a mostly back-end, non-user facing web application that I need to have load tested. I was wondering what the options were that are tailored for my use case. It needs to be a load testing ...
0
votes
4answers
79 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
2answers
112 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 ...
0
votes
1answer
43 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 ...
0
votes
2answers
2k views

Selenium automation on Oracle applications

Is there a way we can perform Selenium automation (with Java) on Oracle applications? On the Oracle website they have given ways by which we can convert the Oracle applications into Oracle ADF faces ...
0
votes
2answers
808 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.
0
votes
1answer
187 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
2answers
2k views

Selenium WebDriver and Highchart testing

I know this question has been asked before on S.O. and other websites but I haven't found a definite answer -- most of them say its not easily done but I wanted to make sure that was the final ...
0
votes
1answer
536 views

Unable to locate element (Modal Dialogue Box)

I'm new to Webdriver. I need to automate a scenario on Mozilla, System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_27' I have a scenario to create a user and ...
0
votes
1answer
319 views

TestNg not executes @BeforeGroup if the method is in another class

My code structure is like this... I have 4 classes having 10 tests and one @BeforeClass method to run before any of the test.In each of 4 classes ,all tests are of one single group. And I have one ...
0
votes
1answer
33 views

Testing Verify Method Call Without Argument In Test Class

I have a class which takes a message with payload String. The payload is then split and used to create an Entity which is passed to DAOInterface to persist. How can you test the call ...
0
votes
1answer
48 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
129 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
1answer
74 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
1answer
157 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: ...
0
votes
1answer
464 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 ...
0
votes
2answers
6k 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
322 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
0
votes
4answers
600 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
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){ ...
0
votes
1answer
137 views

Hyperlinking FindBugs report to source code

By default, the HTML report generated by FindBugs specifies the name of the Java class and line number(s) of each issue it reports. Is there a way to tell FindBugs to hyperlink the report to the ...
-1
votes
3answers
57 views

how to get the count of elements in list box

working on selenium + java,. can any one help me... I have a drop down list box, and need to get the number of elements in the list box. <select id="id"> <option ...
-1
votes
3answers
598 views

Launching WebDriver from a servlet.java throws exception

I prepare a web interface that I could launch the WebDriver. I used servlet.java. I'm using JBoss application server, when I try to run it I receive the following exception 13:39:40,779 ERROR ...
-3
votes
1answer
682 views

How to read data from Excel by using loops? [closed]

I created an Excel file name "readdata.xls" and entered some inputs like UserName Password Akshit Ak12345 Ashwika AS12345 I've written a code like this .... package ...
-4
votes
1answer
1k views

ArrayOutOfBoundException when reading test data from Excel [closed]

I am very new to Selenium RC. Please, help in my question. I installed jxl.jar file (Java library for Excel) and added it to Eclipse build path. I created an Excel file as readdata.xls where I ...