All Questions
Tagged with automated-testing testng
147 questions
4
votes
6
answers
12k
views
How to run same test case of testng on 100 different URL/Domain?
I have one difficult scenario for automation testing.
I want to run one test cases for 100 different URLs/Domain.
Precondition :
Script is generalize and running individuality properly.
Use of ...
3
votes
4
answers
9k
views
How does TestNG priority work for a group?
Suppose I have five test cases out of which three are grouped in "Smoke Testing" and two have not been grouped at all.
If I have set priority for all my test cases from 1 to 5, will the cases from ...
4
votes
3
answers
14k
views
Selenium WebDriver tests sometimes doesn't find elements
I am pretty new to all the Automated Testing thing and recently I have been having trouble with selenium because sometimes fails finding certain input fields / buttons.
I added explicit waits for ...
3
votes
1
answer
11k
views
Executing parallel and sequential TestNG tests in one run
We have a group of tests that can be run in parallel and a group of tests that can only be run sequentially.
I would like TestNG to execute all of them in one run but schedule sequential tests ...
3
votes
4
answers
7k
views
TestNG cannot find parameter for test
I am using selenium webdriver, maven for dependency and java lanaguage and I'm following page object design pattern. This is my first time I am using maven. I am automating a login page. Here browser ...
3
votes
2
answers
2k
views
How to find broken link in Selenium, when a http page have https link and mail address in page body?
I have a http page. Can I verify any broken link when a page has no https link and mail address in the page body.
Is there any way to find the broken link using selenium webdriver in java, when page ...
-1
votes
1
answer
82
views
Selenium Webdriver ExtentReports: Putting logStatus after every statement
I have a testcase.java which houses all the @Test methods (login, signup and forget password). Since I'm using Selenium ExtentReports, I put LogStatus.PASS after every single statement has been ...
0
votes
1
answer
2k
views
java.lang.nullPointerException while running testcase [closed]
package automate;
import java.util.List;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org....
4
votes
3
answers
11k
views
How much time it takes to automate 10 test cases of an module using selenium
It's an Interview question:
If each test case contains 8-10 lines within it.
Then what would be the average time to automate them?
I think it depends on the following factors:
Complexity of the ...
0
votes
2
answers
4k
views
Can we access the value of a member or class variable of a test class in the testListner methods
I have a situation where 'xyz' is member variable of my testClass and I want to print some information in my report using that variable only.
So I want to access 'xyz' in my 'onTestFailure' listner ...
1
vote
1
answer
2k
views
Rerun failed tests with TestNG
I recently migrate from Junit to TestNg. Currently, I try to understand how to rerun the failed test.
According, I've just to run my test suite then recall TestNG with the testng-failed file. Easy.
...
1
vote
0
answers
1k
views
Tools for Data Driven and Keyword driven tests in selenium with python?
I am new to selenium and python, I was watching some videos on data driven and keyword driven tests, the instructor was using TestNG with selenium and
I was wondering are there any tools similar to ...
0
votes
1
answer
44
views
can we create a software application for the full script of selenium coding we have done? [closed]
If we have created some selenium code for web application testing. After completion of the script coding, can we create a java application or something like that?
0
votes
1
answer
807
views
Is use of priority in TestNG a good approach? [closed]
I'm assigning priority to each test method in a specific class under my automation project.
My senior reviewed the script I wrote and mentioned to me that do not use priority instead use the xml to ...
1
vote
2
answers
2k
views
Parallel Testing with Selenium Grid - Static classes have driver issues
I am currently working on an automation project.
I have the project itself complete.
However, I am now integrating Selenium Grid into my project to run my tests parallel on different browsers e.g (...
5
votes
6
answers
25k
views
How to locate an element which is inside the iframe?
I'm new to automation testing (I'm using TestNG framework and Java language) I'm having trouble in locating an element which is inside iframe.
WebElement iframeSwitch= driver.findElement(By.id("...
7
votes
2
answers
30k
views
What is the difference between jUnit & TestNG?
I have started Selenium scripting in my one of the project and I want to know the exact difference between Junit & TestNG. Which one is useful for Tester in Selenium?
Any reference link/Site for ...
1
vote
3
answers
22k
views
Cucumber and TestNG integration
I have a simple question as I am just getting into Test Automation.
I want to develop Cucumber smoke tests and acceptance tests as they would be easy to read and understand for my colleagues. ...
26
votes
6
answers
122k
views
How to handle dynamic changing ID's In XPath?
How to Handle Dynamic Changing IDs In XPath?
for example :
//div[@id='post-body-3647323225296998740']/div[1]/form[1]/input[1]
In this xpath id "3647323225296998740" is changing every time when ...
3
votes
1
answer
3k
views
Is Parallel Testing possible in Cucumber with TestNG?
I am trying to implement Cucumber in my current project with TestNG and I need to execute my script parallely on multiple browsers.
Is Parallel Testing possible in Cucumber? If Yes, Can any one ...
3
votes
2
answers
2k
views
How to run multiple Test cases on different browsers in TestNG with Java
I'm new at TestNG.
So, I want to know more details about how to run multiple test-cases on different browsers. Which Framework model should I use in my project? So that each & every part of my ...
0
votes
3
answers
4k
views
How to run failed test cases using TestNG?
I created jar when I run on command prompt I am able to see result, what I want is "I need to run failed test cases if there is any"
public class DemoProjectClass {
public static void main(...
1
vote
1
answer
1k
views
verify element padding using Galen Framework
I am in process of evaluating Galen as UI automation framework. I am blocked at one point where Galen is unable to give correct results in case of padding around an element. This is the sample DOM.
&...
0
votes
2
answers
173
views
Test methods executed which is are mentioned in test suite xml
I have an issue while executing a test suite. Some of the test methods are automatically executed even though they are not specified in test suite. I am using TestNG + WebDriver
Here I have two test ...
2
votes
4
answers
7k
views
Assert in TestNG (Actual int value, Expected int value)
Is there anyway to assert that,
actual int value = expected int value not equal to 0
Something like,
Assert.assertEquals(length, 0);
0
votes
1
answer
543
views
Test Scenario for cookies in selenium webdriver [closed]
I want to work with cookies in my project, I don't know what will be the Test Scenario and Test Cases for it.
Please help.
0
votes
4
answers
32k
views
How to run multiple test cases without running before and after class again and again
I want to know how run multiple files without running the before class() again and again.
E.g.:
Consider i am writing test case for GMail
login.java : Which contains complete testing of the login ...
1
vote
5
answers
32k
views
Get Text of a WebElement
I'm learning selenium and writing automation script for this website.
I'm trying to get value of the error message, I identified Error Message WebElement using xpath:
".//*[@id='ajax_loginform']/p[@...
2
votes
1
answer
6k
views
send testng report(emailable-report.html) file through mail after executing all test cases
I am trying to send an email after executing the test cases with an attachment of testng generated emailable-report.html file ,But I am resulting in error.
please find the stack trace here and do ...
0
votes
2
answers
1k
views
Export list of testNG tests within a project/suite?
I have a selenium framework in combination with TestNG.
Is it possible to export a list of all test names are their associated descriptions?
2
votes
2
answers
8k
views
How can I ensure testNG test method does not abort if any assert fails
I know there is a difference between assert and verify in Junit; the assert results in a runtime exception, causing test method execution to abort. To overcome this problem, we can have verify which ...
1
vote
1
answer
2k
views
How to disable specific Maven and TestNG test listeners when running tests from groups?
I am using Maven and TestNG to support my Selenium testing framework for a project.
I am using a custom test listener to report results into TestRail (our TCM tool). I am also using another custom ...
5
votes
5
answers
10k
views
IE not executing test case properly in selenium webdriver
I am running test cases on firefox and chrome browsers, it worked fine for me using selenium webdriver. But when it comes to using IE versions(9-11)-
1. I'm getting below mentioned error messages:
...
3
votes
4
answers
19k
views
How to run TestNG failed test cases in Jenkins for Maven project?
I am new to Jenkins and I have configured it on my Windows PC. I have to run failed test cases twice before considering that they are failing. I am using TestNG and Selenium Webdriver for writing test ...
0
votes
2
answers
3k
views
How to run data driven testing using testNG in selenium
I am using testNG framework and tried to import data from excel sheet in my local. If I run the code as simple java application then its running but with testNG its not
public class NewTest {
...
1
vote
1
answer
6k
views
How to modify testNG report in selenium java
I am running my script in java and getting the results in testNG. But in my application after filling up the form I am getting a confirmation alert message. I am able to read that alert message and ...
0
votes
1
answer
1k
views
How to open a link in new tab and then coming back to previous tab in webdriver
I have a situation in which I have to perform some action on one web page and their changes will reflect in the other web page. And after that I want to check whether changes are reflecting or not by ...
1
vote
1
answer
263
views
To run all test cases by invoking driver once for a suite
I want to run all my test cases with one start up and tear down process. I have written code for multiple browser testing and as of now I am repeating those codes in every class file under @...
2
votes
3
answers
17k
views
Using multiple instances of webDriver
I have defined an object of Web driver in one class as
Static WebDriver driver;
and want to use that instance in another class to automate the browser. Is it possible? Or will I have to define ...
0
votes
2
answers
42k
views
Send testng report through email after test execution
I have to send an email of report of the test as soon as my all tests get executed. I will have to mention this in AfterSuite but don't know what exactly will have to use to achieve this. Any ...
0
votes
5
answers
4k
views
How to revert the changes made by selenium in a tear down process?
I am in a situation where I have to revert all the changes which I made while testing the application. Is there any way of doing this in Testng?
Suppose if I have added something into the ...
0
votes
1
answer
320
views
How to open and get input from a popup before running test?
I want to open a popup before running my tests and after completing my test run. I want to give few inputs from the popup on basis of that my test will run.
Suppose I have multiple links on which my ...
3
votes
1
answer
9k
views
How to run multiple browser instance with Webdriver, Java, and Junit/TestNG?
I have a test ready to be executed but it takes a long time to finish. In this test I'm feeding in csv data, so basically the whole test will run 56 times. I was wondering if there's anyway I could ...
6
votes
3
answers
15k
views
Difference between Selenium and TestNG
Am a beginner in Selenium and am trying to learn selenium on my own by googling. One thing which I noticed was in many of the posts which I read about selenium the name of the framework by name "...
2
votes
0
answers
752
views
How to keep test cases synced with HP ALM after refactoring?
We're planning to automate test synchronization between HP ALM QC and our TestNG test cases. We want to keep them synced in the following scenarios:
Test adding: When creating TestNG test, a test ...
14
votes
3
answers
20k
views
Automated tests pass every time when run individually, but when they are clumped into a test suite it's a toss up if the tests will pass
I have around 200 test classes for my web application at the moment. I use Selenium2/Webdriver and the tests are written in java, with TestNG used as my framework.
When I run each test by itself, ...
2
votes
0
answers
1k
views
How to report test execution method when using @Factory in TestNG? [closed]
I am using @Factory annotation from TestNG to create tests dynamically. It will read a property file that contains the list of test cases to be executed and return them.
@Factory
public Object[] dp()...