Skip to main content
39 votes

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

One of the biggest mistakes in my career was to pick a different programming language for the test automation than the development team uses. You won't get help from the development team when you ...
Niels van Reijmersdal's user avatar
14 votes

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

You can choose any language irrespective of which language is used in development. But it would be better if you go with same programming language which is used in the development, in your case it ...
JAINAM's user avatar
  • 1,835
10 votes

Selenium Webdriver, C# and accessing rows in a table

Get the table, then its rows, then each row's TDs, then each TD's anchor: var table = driver.FindElement(By.TagName("table")); var rows = table.FindElements(By.TagName("tr")); foreach (var row in ...
kirbycope's user avatar
  • 4,090
9 votes
Accepted

How to disable infobar from Chrome

Disabling infobars is not supported anymore by Chromium. According to them, Remove --disable-infobars. This flag is no longer needed by the perf testing infrastructure and can be misused ...
Shahid's user avatar
  • 624
9 votes
Accepted

API Testing tools in C#

You can use the combination of any unit testing framework (like NUnit, MSTest, XUnit) with additional nuget packages for the work with REST API itself RestSharp (http://restsharp.org/) Probably the ...
501NotImplemented's user avatar
9 votes
Accepted

Is there any way to click on 6th item of this list

You can use a CSS Selector looking for a substring at the onclick attribute: div[onclick*='2005256'] This will look for the client regardless of the position. If you want by position: #searchpanel-...
João Farias's user avatar
9 votes

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

Definetly learn C#. Why? At Selenium tests level it's basically the same thing as Java 9. With a bit of syntactic sugars. It shouldn't take you more than 2 weeks to get up to speed with C#. CI/CD and ...
Michal Dobrzycki's user avatar
8 votes
Accepted

Selenium PageFactory vs Page Object Model

Page Object and Selenium's PageFactory are distinct things in nature, usually the latter complement the former. Page Object is a design pattern aimed at solving the problem of separating the ...
João Farias's user avatar
6 votes
Accepted

Sikuli and it's effectiveness with .NET

There are three .Net wrappers for Sikuli. Personally, I was a bit disappointed in all of them. Edit: there was a small bug in SikuliSharp which was causing commands to Sikuli to fail. Now that this ...
FDM's user avatar
  • 5,894
6 votes

Where tools for automated UI test like selenium or Coded UI fits in Dev Ops cycle

In this context, a goal you most likely want to achieve is one of Continuous Integration (CI). To that end, from the developer side, every check-in will trigger a build (to perform certain checks and ...
FDM's user avatar
  • 5,894
6 votes
Accepted

How to select an unordered list in Selenium using C#

Your problem is with the selector indeed. Issue 1 When using XPath in the context of another element (as you are doing), always start the XPath with a dot (which represent the element you are ...
FDM's user avatar
  • 5,894
6 votes

API Testing tools in C#

Writing an API test in Visual Studio can be done with: NUnit or MSTest as your Test Runner ** NUnit and the TestAdapter are available on Nuget An http client, like .Net's HttpClient ** This is in the ...
kirbycope's user avatar
  • 4,090
6 votes
Accepted

How to select the second tr of my HTML?

To add explanation to what you have already figured out. The problem was that with this line you correctly acquired the second row: IWebElement secondRow = driver.FindElement(By.CssSelector("table tr:...
Bence Kaulics's user avatar
6 votes

How to automate Microsoft two-way authentication based login page in Selenium using C#?

Some options in my order of preference: Probably you do not want to test the TwoFactorAuth, but you want to test the application behind it. Consider building a backdoor which is only enabled in the ...
Niels van Reijmersdal's user avatar
5 votes

C# WebDriver StaleElementReferenceException

StaleElementReferenceException is really common with Selenium. To avoid these issues you should be waiting for an element to load before manipulating it (clicking, sending keys, etc). This will ...
Chris Kenst's user avatar
  • 3,741
5 votes

How much C# should I learn in order to work with CodedUI?

If you are concerned about learning too much, you are doing it WRONG. The more you learn, the easier it will be for you to solve common problems. We are getting questions DAILY here which would be ...
Peter M. - stands for Monica's user avatar
5 votes

Exception while in a for-each loop in C# Selenium

You are likely getting a StaleElementException. When you first get the list of elements to click, they are attached to the current DOM. After navigating away (the first time) the elements are no ...
kirbycope's user avatar
  • 4,090
5 votes
Accepted

Selenium C# - How to wait with WebDriverWait using the element as parameter instead of a locator?

The easiest way is to create your own ExpectedConditions class with methods accepting a WebElement as parameter, for example: Wait.Until(MyConditions.ElementIsVisible(element)); With the ...
FDM's user avatar
  • 5,894
5 votes
Accepted

Automation Testing approach for Web Based Application

I do not have a separate TestBase/Service class for each test. I have just Page Object classes which contain the page factory and unit test classes which contain the test methods. Is this approach ...
evets17's user avatar
  • 106
5 votes
Accepted

Useful real-world APIs to test against

GitHub is really useful for lists of resources and I came across one yesterday that is a collection of free APIs for use in web development. <- I think you'd be good to test most any of these APIs ...
Chris Kenst's user avatar
  • 3,741
4 votes

Login Via Jmeter for ASP page does not work

JMeter's built-in script recorder tends to create problems with the test scripts when the URL is SSL encrypted (HTTPS). This may be because JMeter uses proxy when recording the scripts and while ...
IAmMilinPatel's user avatar
4 votes
Accepted

Selenium: how to wait for javascript fadeout (visibility and clickable don't work)

Instead of waiting for your element, try to put wait for the invisibility of previous element. Like try the below code: WebDriverWait wait = new WebDriverWait(driver, 100); boolean waitUntil = ...
saurabhguptacse's user avatar
4 votes

Selenium waits for Page object model

Good practice - That you are trying to stick with Implicit wait. It may happen at some instance you have to use explicit wait.[Keep in mind] Wait for element // wait for field WebDriverWait wait = ...
Narendra Chandratre's user avatar
4 votes

How to execute automation scripts in IE & Edge browser InPrivate mode using selenium c#

Microsoft has changed the behavior of IE11, and broken the IE driver in the process. The problem is with the browser's behavior change. There is no clear-cut workaround yet. You could try setting the ...
Bharat Mane's user avatar
  • 6,785
4 votes
Accepted

Parallel Execution in Selenium with Visual Studio

Disclaimer: the answer is assuming you're using the MsTest unit test framework. Solution 1 The easiest way to run parallel tests is simply to activate this flag here: An important note here: this ...
FDM's user avatar
  • 5,894
4 votes
Accepted

Issue with find element

Try this: bool IsPresent= driver.FindElement(By.XPath("/html/body/main/div/section/h3")).Displayed; if (IsPresent) { Console.WriteLine("Element exists"); } else { Console.WriteLine("Element ...
Ahmed Assem's user avatar
4 votes

What is the simplest way to rewrite Postman requests to C#

ReSharper is an Visual Studio IDE Plugin for C# by JetBrains. This won't help you much unless you want to write everything from scratch. Postman has the ability to generate code snippets for various ...
beatngu13's user avatar
  • 2,142
4 votes

How to disable infobar from Chrome

Solution for Java, Python, Ruby, JS, Protractor https://help.applitools.com/hc/en-us/articles/360007189411--Chrome-is-being-controlled-by-automated-test-software-notification When using java, you can ...
Danilo Arantes's user avatar
4 votes
Accepted

Force Selenium to wait for spinner to disappear before resuming

Safest is checking for presence of elements (in a loop). It does not wait, but will return list of element present (matching the locator). Returned list will be empty if spinners is not found. If ...
Peter M. - stands for Monica's user avatar
4 votes
Accepted

WebDriverWait ExpectedConditions stopped working after updating Selenium.Support NuGet

The set of expected conditions is being removed from the Selenium C# bindings. Though you can still add them to your library from the source: https://github.com/SeleniumHQ/selenium/blob/master/...
Florent B.'s user avatar

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