Tag Info

Hot answers tagged

9

I suspect this is not a TestNG issue. I would start by trying to produce a minimal set of tests that, when run together, cause failures. After that, I would explore these possibilities: Inter-test interaction changes test-application interaction: It is possible that interaction between your tests changes how your test interactions with your application. ...


5

If you're using xpath selectors that might be the culprit and you could try converting to CSS selectors instead. I understand that xpath engines are different between browsers, while CSS is native which makes it more efficient. Here's a link of a Sauce Labs blog post with more details on CSS vs xpath: ...


3

What type of machine are you running it on? Most likely it has nothing to do with TestNG having any type of thread limits (I couldn't find anything saying there were in fact limits) but rather your local box. Thread count limits on Windows or Linux are determined by the stack space. Explanations can be found here and here. On Windows the default stack size ...


3

I have used Selenium and TestNG in the past to manage a lot of my automation and as Siva mentioned you do have the basics down. While TestNG is one of the most common Frameworks out there, it is not the only one, and you can use whatever one works for you. So long as you can import the Selenium drivers you can use any framework in which you are familiar, ...


2

I don't quite get why you would like to share browser session. UI test methods should be run in the own independent browser. In case you insist, you could use @BeforeClass of TestNG and have driver set up done in @BeforeClass method. Now both of your methods should be either in this class or class with extends the set up class. Confused? This might help - ...


1

Both Saucelabs and TestingBot provide a service which records your Selenium tests if you run them against their Selenium Grid. Both offer a number of free minutes per month, which might suffice your needs. You can view/download the video's straight after the test run is finished. Although I don't know how their setup works, I think I can give you some ...


1

The short answer is that yes, you can do this. I don't have the code that will do it to hand, but you will find the basic information at http://msdn.microsoft.com/en-us/library/hh694602.aspx The Microsoft preferred method is to store the test data in some form of external data source (so that if the data needs to change you don't need to recompile) - the ...


1

This worked for me to right click on a row in table. //Selecting all cells of the HTML table List<WebElement> elementNumList=driver.findElements(By.xpath("//a[@id='elemnetId']")); //Taking 1st cell WebElement link=elementNumList.get(0); //Right Clicking new Actions(driver).contextClick(link).perform();



Only top voted, non community-wiki answers of a minimum length are eligible