Skip to main content

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
26 votes
5 answers
57k 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
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
19 votes
7 answers
26k views

How to disable Chrome save your password? (Selenium Java)

What is the method to disable this pop-up: Do you want Google Chrome to save your password for this site? How to do this with Selenium Webdriver (Java)?
Ganeshselvan N's user avatar
17 votes
6 answers
6k views

Writing test automation in Java, while the company domain uses C#/.NET

I´ve recently got a job as a automation tester in a company, that basically only have manual testers (except me). The short term plan is to come up with a good test strategy for identifying which of ...
user1892117's user avatar
17 votes
8 answers
223k views

How to continue script when element is not found in selenium

I am using selenium web driver and appium as this is mobile application automation, I am trying to check that if element is there or not and based on that I have put conditions. long starttime = ...
Helping Hands'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
15 votes
9 answers
60k views

How to write XPath if I have 'apostrophe' in my XPath element?

I came up in a situation where I have to identify an element using XPath and my element starts with apostrophe ('). I will give the example below. This is the usual way we write some XPath. By ...
sarath's user avatar
  • 409
13 votes
1 answer
13k views

JMeter: Getting error in non GUI mode

While trying to execute JMeter from the command line in non-GUI mode I'm getting errorlevel=2 error message. What I did is, Navigate to the JMeter bin directory in command prompt. Run the command &...
IAmMilinPatel'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 ...
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
11 votes
5 answers
19k 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 ...
Alexey R.'s user avatar
  • 11.6k
10 votes
2 answers
56k 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
8 answers
6k 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 ...
Kharbora's user avatar
  • 551
9 votes
11 answers
101k 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
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
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
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
  • 213
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
3 answers
31k views

Selenium form input sendKeys doesn't always work under IE

We're trying to use Selenium 2.0b3 to verify behavior of a Java web site we've recently acquired from a third party. The site often uses AJAX to plop HTML replacements onto the page. Internet ...
Alan Krueger's user avatar
9 votes
2 answers
7k views

key points for choosing a framework in selenium webdriver - Java

My query is related to this Choosing framework type for selenium RC/Webdriver I am a beginner in Selenium and want to know how to select or choose a framework in Selenium Webdriver. What are the key ...
forumqaa's user avatar
  • 389
9 votes
1 answer
4k 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
329k 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
28k views

TestNG Mark a Test as Failed if a Particular Path is Used

Is there a way to mark a test as failed in the TestNG framework if a certain path is followed? I know I can use system.exit(1); or something similar to mark an abnormal termination but it doesn't ...
Brett K's user avatar
  • 315
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
8 votes
5 answers
13k 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 ...
Rabimba Karanjai's user avatar
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
7 answers
13k 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
17 answers
59k 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
7 votes
2 answers
376 views

When to start testing a solo project?

I'm building a solo project myself. (Java backend, Java AWT frontend. No lectures about AWT vs swing vs *wt, please :-)) It's fairly straightforward Primary server - keeps user information Content ...
corsiKa's user avatar
  • 7,102
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
7 votes
4 answers
107k 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
2 answers
73k views

How to wait for an api request to return a response?

We use a proprietary framework based on the REST-assured library and TestNG to automate API testing for our REST web services. I saw some api testing code which uses Thread.sleep(n seconds) to wait ...
JohnSink's user avatar
  • 567
7 votes
4 answers
32k views

How to check is image is loaded or not in selenium?

I have a html div like this <div if="url" class="img-alt__graphic ng-scope" ng-style="ieCSSFilters" style="background-image: url(www.xxxxxxx.com;size=270x360);"></div> In this div tag I ...
Santhosh's user avatar
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
7 votes
1 answer
881 views

Selenium + Java: How to get the OS, and Browser details on run time?

What I want to do is, while I'm running my tests, I want to get the current, Operating System Browser Name Browser Version This is for making the details clear in the test/bug report. I haven't ...
RonyPatricks's user avatar
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
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
6 votes
5 answers
67k views

How to modify HTTP request header in Selenium WebDriver with Java?

I want to add "iv-user" request header to log into web app. I'm using the newest ChromeDriver. Using extensions like ModHeader or ModifyHeaders is not working in this case. Fiddler is working, but I ...
M. Murawski's user avatar
6 votes
2 answers
10k views

How headless mode is faster?

I'm using the below configurations: Selenium 3.8.0 Java 8 Ubuntu 16.04 I have automated my Application and am running tests in the Chrome browser. I came to know about PhantomJS driver to run tests ...
NarendraR's user avatar
  • 1,573
6 votes
7 answers
54k views

How can I bring Chrome browser to focus when running a Selenium test using ChromeDriver on Mac?

When executing a Selenium test with ChromeDriver, I would like to bring the test browser into focus to see the actions taking place. The way I am able to do that now is by manually clicking the ...
klmlfl's user avatar
  • 218
6 votes
5 answers
4k 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 ...
Classified's user avatar
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
6 votes
3 answers
28k views

Is there a way to use the same login session on a Selenium WebDriver already opened?

I have spent a while for the solution but couldn't find anything for my specific problem. I am automating a task with Selenium and need to log in a system. If I do it manually, the system will keep ...
Marco.S's user avatar
  • 163
6 votes
3 answers
39k views

How to identify element with knowledge of partial text for any tag (eg. div,span etc.) contains?

My source goes like this: <div name="something" id="something"....>IPS125</div> the number after IPS always changes. So I need to give the identification attribute as partial text "IPS". ...
Sujay Ghorpade's user avatar
6 votes
2 answers
77k views

How to compare values from the list or from dropdown list in webdriver (Java)?

Below is my code and html code, please let me know how to compare values. When i executed i am getting same result (Mateched) for multiple times. But i want to compare and display result as "Matched" (...
QA4it's user avatar
  • 1,412
6 votes
1 answer
29k views

Selenium: getPageSource() returns previous pages' source

I'm logging into the page using this function: public static void login() { driver.get(url); driver.findElement(By.name("username")).clear(); driver.findElement(By.name("...
Antoine089's user avatar
6 votes
1 answer
14k 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 ...
vinod guneja's user avatar
6 votes
6 answers
29k views

Suggest me the best way to automate REST web services with JSON using Java

I was testing web services manually using Postman or REST client. I want to automate testing here. I use REST with JSON format. Questions: How to use target URL ? How to pass header values? How to ...
Jagadeesh's user avatar
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
1 answer
7k 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 ...
Reddy's user avatar
  • 161

1
2 3 4 5
30