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

2
votes
2answers
3k views

How to start on QTP to automate a java swing application?

I have to start my automation on java swing application using QTP. I am quite a newbie in qtp. All I need is some documentation of the TOOL on how to get things configured and a step by step guide on ...
1
vote
3answers
320 views

Porting Selenium test from Firefox driver to HTMLUnit driver

I am trying to convert my selenium test from Firefox browser to HTMLUnit driver. But, when I try to run the HTMLUnit test , it gives me error for XPATH. The Firefox browser test runs absolutely fine. ...
3
votes
2answers
99 views

How to make a test of favicon in Selenium?

I have a task to check presence of the favicon on the page. How to do it? I use Selenium WebDriver. I made in the same way, addressed according to the link "http://my_site.com/favicon.ico", and ...
1
vote
0answers
52 views

Page factory performance

Does page factory affect on performance for test execution when we have a lot of elements with @FindBy? We use Java as a programming language.
0
votes
1answer
54 views

How to get color of java table row/cell with QTP/UFT (java swing application)?

I need to test that the color of java table row has changed to some specific value. But till now I see no solutions of getting this property. Let's assume that jTableObj is OR or DP representation of ...
0
votes
2answers
57 views

How to send key '(' and '!' to Selenium Web Driver?

I was trying to do write a test a case for a website that takes in the Java code , compiles it and runs it. However, while writing the test case , the text-area that takes input did not have all the ...
0
votes
2answers
102 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 ...
1
vote
3answers
219 views

Running application doesn't execute any code but opens a new window

I am trying a build an automated testing framework, using Selenium WebDriver to simply login a website. However, when I run the following code, the only thing that happens is a new internet explorer ...
0
votes
2answers
41 views

How to mark all the checkboxes with Selenium Webdriver using Java?

I want to mark all the checkboxes in a page using selenium webdriver? How can I implement that?
0
votes
0answers
22 views

Which testing library this code comes from?

Which testing library this code comes from and what anti-patterns it contains? private String toString(int status) { switch(status) { case 1: return "SUCCESS"; case 2: ...
0
votes
2answers
42 views

Need to get the value from h1 tag

Need xpath for the below script where i need to store the number 3: <div class="col-xs-4"> <div class="col-xs-8"> <small class="stat-label"> <a style="color:#fff;" ...
0
votes
3answers
154 views

Spring framework to write Selenium Automation framework [closed]

I don't know it would be good idea. So I am looking for PROS and CONS of making Selenium Framework using Spring Framework. I have not come across a single forum/post/tutorial about this idea. If its ...
-1
votes
2answers
2k views

How to handle multiple columns of Data from Excel using Apache POI for Selenium WebDriver

I am new to Selenium WebDriver and I am automating an end to end test. My doubt here is, all the data for the test is stored in an excel file which contains more than 15 columns of data. Each @Test ...
1
vote
1answer
75 views

How to use chrome Plugins in Selenium WebDriver

I want to use chrome Plugins like what font, full page Screen capture. in one of my project, can we write the code for it? using Selenium web-driver + java. i am still on search, is there any work ...
8
votes
8answers
2k views

Is writing unit tests difficult for me as a QA engineer?

I currently work as a QA engineer and work a lot with Java, Selenium and test automation. But, unit tests are something the developers have been doing and something that I fear. Is it difficult? Do ...
2
votes
3answers
2k views

Cannot Instantiate class error - Selenium WebDriver

I am facing this 'Cannot insantiate class' error on running one of my test cases in Selenium webdriver using Java. Below is the class of the functionality of the test, package Pages; import ...
1
vote
2answers
94 views

What language is required when learning Selendroid?

I want to learn Selendroid. I do not know what language I need to know before starting with selendroid. I know selenium using Java. For selendroid, do I have to learn android?
0
votes
1answer
43 views

How to retrieve automated Test case names from Testlink

We are using Test link & Selenium webdriver for automation, we are updating the results of execution to Testlink once the execution completed. We would like to retrieve the Test cases from Test ...
0
votes
2answers
48 views

Stuck at NoSuchElement exception in selenium

I have a form which requires its data consists of textbox, combo box etc and finally i need to save. Please find below outer HTML pattern of save button: <input type="submit" ...
1
vote
3answers
3k 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); ...
1
vote
1answer
126 views

Get runtime property for the same element

When we enter text in google search textbox it auto-suggest the options, the objects changes. Now I want to click the Search button which was earlier Google Search. I have created the Google Search ...
3
votes
2answers
121 views

How to find out which languages are supported by a website?

I am facing a problem while doing localization testing using selenium web driver and java,how to find out the languages supported by a web page? what i want to achieve is following 1. Enter the URL ...
3
votes
1answer
155 views

Handle conflicts in parallel execution of jUnit testruns using the same database

I am actually working on how to manage the execution of many jUnit classes calling the same database, the tests interact using Web-services. If it is possible, it would be a great help if you would ...
2
votes
4answers
116 views

What set of toolkits and frameworks should I learn to be considered as a good tester

I am very new at testing, so my apologies in advance if my question is very primary. I started my job as a Tester 4 months ago. I am using Java, Selenium and Sikuli to write tests for applications. I ...
0
votes
1answer
123 views

Unit testing with external files

I started writing unit tests recently and need to test reading fields in a spreadsheet (.xlsx and .xls), my biggest question is: Should I create a spreadsheet by code using Apache POI or use external ...
2
votes
5answers
660 views

Where to start learning test automation from?

Nervously looking at job posts, automation and programming is no longer "good-to-have". It is almost a must. I'm a manual tester looking to start working towards automated testing/test automation. I ...
1
vote
2answers
726 views

How difficult is selenium and test-automation in general? [closed]

How difficult is it to start writing test-scripts for someone who has been coding in Java? I've been hearing a lot about test-automation, selenium, test-script and so on but I cant get my hands on ...
0
votes
1answer
29 views

Compare if the output values are sorted or not using tree map and comparator

import java.util.Collections; import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import ...
0
votes
2answers
92 views

TestNG showing as test passed even if assertion fails

I use below Java code to check if test fails @Test public void myMethod(){ .. .. Assert.assertEquals(condition1,condition2); }catch(AssertionError e){ e.printStackTrace(); } Even if condition1 and ...
1
vote
2answers
85 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 { ...
-1
votes
1answer
87 views

How should look test in webdriver with scenario

I have to test demo.opencart.com. Here is my scenario: Test scenario: 1 Open browser and go to Democart 2 Change currency to GBP (top left dropdown) 3 Search for “iPod” using text search 4 Add ...
0
votes
0answers
18 views

How to calculate DOM size in web application using chrome profiler?

I am doing performance testing of a single page web application.How to calculate DOM size in web application using chrome profiler?
0
votes
0answers
10 views

Script Progression Status on browser

Is there any method available to get status of script execution(passed/failed) on the current browser window itself? e.g.May be a JavaScript popup after script completion or script waiting pop up when ...
1
vote
2answers
744 views

Executing on a selected node in selenium grid

I have one scenario i.e.. I have one web view to take all actions(click,send-keys,opening new window) and locator types(ex: xpath,id,name and cssClassName) with these values I am going to create a ...
1
vote
1answer
681 views

How to select hidden dropdown list in selenium webdriver with java?

I am trying to select the item from dropdown in selenium webdriver using java, but not able to select it. Its showing element not found exception and in html tag drop down is hidden. html code are: ...
-2
votes
4answers
62 views

How to move inside else not to catch? [closed]

i am using selenium with java public void main(String args[]){ try{ if(ele.isDisplayed) { syso("test1"); } else { syso("test2"); } } catch(Exception e){ ...
3
votes
4answers
83 views

Can selenium driver detect which platform it is running in

I need to verify that a certain condition happens on different platforms, e.g. a link of an app for iphone only happens on ios devices, and similarly, a link of an app for android only happens on ...
4
votes
4answers
24k 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 ...
2
votes
1answer
86 views

how to compare my app battery usage to other apps usage?

I have built a navigation app (android and iOS) I want to automatically\manually test its battery consumption while navigating from A to B. And compare it to the battery consumption of external apps ...
2
votes
4answers
67k 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
0answers
179 views

Appium vs Espresso for Android Automated Testing

For last few weeks, I was using appium(python) for android testing but yesterday we have decided to shift to Expresso(Java) for automated testing. There are couple of reasons why we are making this ...
5
votes
3answers
2k 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 ...
1
vote
3answers
94 views

Where to store XPath variables

Where should I store XPath variables - in a class or in an external file? What are the (dis)advantages of these approaches?
1
vote
2answers
68 views

Make code to wait before executing click() command

I have a Java code that populates all the text fields automatically. Before executing click() command for Submit button, I need to enter the Captcha manually. So I would like to make the code to wait ...
0
votes
1answer
30 views

Cannot click on Upload button due to new browser window that opens at run time only

I want to click on the Upload button but when the script runs this click event triggers a new browser to open which I cannot simulate when I try to test it manually. I deliberately click on Start ...
0
votes
3answers
86 views

How can i avoid or fix time outs in Selenium Java?

I'am using Selenium with Standalone Server (V2.48.2) with NetBeans and using Firefox (V44.0). I have tried different ways to get this fixed, but its an error that appears to be random in different ...
2
votes
3answers
361 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 ...
-2
votes
1answer
2k views

Get element by cursor position in selenium

I'm writing an automation testing framework using Selenium. I am trying to Locate which element my cursor is pointing to. for eg. there are two textbox textbox1 and textbox2. If I perform a tab swift ...
0
votes
2answers
61 views

How to Clear Cookies in Selenium?

In Our application while testing Manually we clear Cookies (Ctrl+Shift+Del), How can I automate this step? Note: We are using Java
1
vote
1answer
67 views

Automation - Testing the Contents in EMail

In my application I am supposed to test/fetch the data and contents of the E-Mail received after triggering the Schedule. How can I automate this scenario using Selenium web-driver ?