C# is a multi-paradigm programming language developed by Microsoft.

learn more… | top users | synonyms

32
votes
4answers
6k views

Are Selenium functional tests reliable enough to be worthwhile?

I'm finding that regardless of how solid my tests scripts are, I still have tests that fail (falsely), even though they worked just fine before. I'm not talking about if markup changes (although that ...
7
votes
2answers
5k views

How can I send the action “Ctrl” + “Alt” + “Double Click” to the browser

I am writing automated tests for a site at work and we have certain screens that when we send a specific set of keystrokes, a section of the page will become visible and allows us to see information ...
6
votes
2answers
597 views

Why does selenium fail every so often when running more complex tests because it can't find an element on the page?

private IWebDriver driver; private ChildSearchPage currentChild; private IWebElement divMeetingsTab { get { return driver.FindElement(By.Id("Content_InfantTab1_divMeetings")); } } private IWebElement ...
6
votes
5answers
20k views

How to start a Selenium2 WebDriver window in background?

I have a series of Selenium2 test cases in C#/NUnit that are run sequentially. Each test case runs in a new instance of the WebDriver (and this is necessary) - which means that each time a new test ...
6
votes
1answer
959 views

What's the best way to test log4net logging?

What's the best way to test log4net logging? As logging is to some degree an interface to our component, I want to make sure it keeps working as it can be configured in a few different ways. Should ...
5
votes
1answer
986 views

Read requests and responses made by browser on naviagating a web page in C# webdriver

I wants to read all the requests and responses made and get by the browser on navigating on a page. For ex: If I navigate to http://www.yahoo.com then we observe that browser is making a lots of GET ...
5
votes
2answers
2k views

Writing automated tests for System.Web.HttpApplication

I am currently using Moq to write automated tests for System.Web.HttpApplication in C#: public FakeHttpApplication CreateBaseMocks() { MockContext = new Mock<HttpContextBase>(); ...
4
votes
4answers
3k 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 ...
4
votes
3answers
306 views

Can NUnit be used for Functional and Regression testing?

Now, here the confusion starts. I was creating some test cases using Selenium WebDriver with C# and thought of using a testing framework. My task is to create functional test cases which can later be ...
4
votes
2answers
12k views

Problem catching Selenium Webdriver NoSuchElementException

I have many test cases written in C# using Selenium2 Webdriver with NUnit. I have a problem that when a NoSuchElementException is thrown, it is treated as an unhandled exception despite me using a ...
4
votes
1answer
1k views

Coded UI - How to launch website in IE InPrivate Browsing mode?

I am trying to launch my website by default in IE InPrivate mode so I can get rid of tons of code to handle multiple scenarios (listed below) script may counter during execution. My goal is to run ...
4
votes
1answer
638 views

Testing EJB based web service - Java vs .NET vs SoapUI

I am testing a workflow application that takes the user step by step through each task. The inputs in each task are basically just barcodes or some numerical values. Fortunately, each task has an EJB ...
4
votes
1answer
2k views

Inconsistent results when capturing javascript errors with WebDriver

I'm using a technique I found here, to capture javascript errors for testing purposes. It's a technique that is frequently recommended on Stack Overflow for those who need to catch JavaScript errors ...
4
votes
1answer
13k views

How to fix “Permission denied to access property 'document'”?

I posted it on stackoverflow.com. Someone suggested me to post it here... While trying to automate testing with selenium rc I ran into this problem. I was just following the steps in the tutorials. ...
4
votes
2answers
859 views

Mocking IVR system

I am new to automation testing and was looking for guidance on how I can mock or create a simulator for a IVR ( automated call system ). We have an application, which sends some user data to a third ...
4
votes
2answers
31 views

“Element is not currently visible and so may not be interacted with” when locating element by CssSelector/helptext

I faced an issue with locating the element. Currently it's impossible to locate it by CssSelector/helptext, but it's located by CssSelector/Id without issues Here's the element <span ...
3
votes
1answer
119 views

Unit tests: avoiding overspecification

Say I have the following method that sends emails. I know I should have tests for the different status codes returned. I am also testing if the the methods CreateMail() and Send() are being called. I ...
3
votes
1answer
3k views

Using Selenium's PageObject pattern and an Open() method

Here is an example of some C# WebDriver code I'm using to model a registration page: public class RegistrationPage : BasePage { private IWebDriver driver; private String URL = ...
3
votes
1answer
756 views

BDD SpecFlow w/WatiN test during/after redirect

I have begun to use SpecFlow and WatiN to automate UI tests in IE9, and am encountering a maddening problem which may have nothing do to with either, but hey. I have the following step: [Then] public ...
3
votes
1answer
1k views

Deploying Selenium RC tests with Teamcity

I'm looking at setting up my Selenium tests in a QA environment which will run with a Teamcity build each time. This seems to be the best resource I've come across so far where someone has gone ...
3
votes
2answers
1k views

How do I unit test Word AddIn written in C#

I need end-to-end guidance on this topic. Here is a scenario: I have a Word AddIn written in C#, in which I have some interop interaction with Excel. I need to unit-test that. How? There is no ...
3
votes
2answers
3k views

Selenium error in NUnit C#

I got the following error when I try to run this test: TheNewTest : FailedSelenium.SeleniumException : Timed out after 5000ms at Selenium.HttpCommandProcessor.DoCommand(String command, String[] ...
3
votes
2answers
4k views

switching windows with Selenium2 and c# where popup window has same title as originating window

I've been attempting to figure this out for the past two days, unfortunately with no luck. I'm currently automating a scenario where a new window for a form is popped up from the main application ...
3
votes
2answers
3k views

Alternative for user extensions in Selenium 2 WebDriver w/ jQuery?

I've been switching over our company's automation scripts from Selenium IDE to Selenium 2.0 WebDriver. The problem is that we have a crap load of user extension custom commands because of all the ...
3
votes
1answer
964 views

The HTTP request to the remote WebDriver server timed out after 60 seconds

I am running selenium tests in C# and every now and then I get this error while initiating or running my tests: The HTTP request to the remote WebDriver server for http://localhost:7055/xxxxx timed ...
3
votes
1answer
3k views

How to instantiate a .NET FirefoxDriver when FF is installed in non-default location?

My Firefox 5 is installed not at the default location. So, I tried with the following to create a FirefoxDriver: private IWebDriver driver; [SetUp] public void SetupTest() { var ffBinary = new ...
3
votes
1answer
165 views

Explicit wait is not reliable with Selenium C#

While creating test scripts in Selenium WebDriver using C#, I have used Explicit wait (after going through this link) and have also gone through SO and SQA links for the same. So, I implemented it ...
2
votes
2answers
887 views

Testing pdf/excel content with C#

Our site has a good number of reports that are using SSRS,Crystal and Excel. We are using C# with Selenium WebDriver. I have been searching for the best practices and best ways and tools to test the ...
2
votes
2answers
45 views

How to set ComboBox value in Coded UI using Value Attribute?

In coded UI is there a way to set the value of a ComboBox using the value of Value Attribute. Consider the following Html of a ComboBox: <select name="ParametersID" tabindex="-1" title="ABC" ...
2
votes
3answers
763 views

Efficient way of reading data from Excel in Selenium C#

I am creating some test cases in Selenium WebDriver using C# (I can't use Java as client has said so). These are sample test cases which will be used for presenting a demo to client and senior ...
2
votes
4answers
3k views

Has any faced issue when automating auto suggest text box using selenium webdriver

I am automating an application which has auto suggest text box. I am facing an issue that sometimes the auto suggest values are not shown up at all. This happens 50% of the time. Worrying part is this ...
2
votes
1answer
3k views

Unable to launch Chrome in remote webdriver

I have tried the following three options . I am using C# DesiredCapabilities capabilities = DesiredCapabilities.Chrome(); capabilities.SetCapability("chrome.binary", ...
2
votes
1answer
23 views

Coded UI Test Explorer execution order?

What is the order of test cases execution in Coded UI? I have my test cases created in Coded UI and they all follow a naming convention e.g. _, so my test cases name looks like: ...
2
votes
1answer
17 views

Is it possible to Serialize a UITestControl (when using Coded UI)?

Let me start by saying that currently I am not using the record and playback features of Coded UI, nor am I using the UIMap features. I am trying to speed up the performance of my Coded UI tests ...
2
votes
2answers
395 views

Execute a particular test using command prompt and Selenium, NUnit, Test cases written in C#

I have written a number of test cases in C# for UI which uses Selenium Webdriver (I am new to Selenium). I would like to run a particular test case out of N number of test cases through command ...
2
votes
3answers
112 views

Testing using Selenium

I am a software architect we use selenium tests with nunit and c# i am trying to run jmeter load testing using firefox jmeter recorder (for blazemeter) i was sure selenium has its own cross ...
2
votes
2answers
274 views

Opening Multiple windows of firefox in the same test case

My question might sound very odd to you all but just wondering if this is possible for us. Okay so I have written 10 cases for my login page in selenium using C# .net. But they take quite a lot of ...
2
votes
1answer
255 views

Programming language for testing GUI written in C#

Our GUI for our Windows application is written in C#. I want to write some automated regression tests. Which programming languages would work? Have in mind: I do not have access to source code. I ...
2
votes
1answer
198 views

Problem with selecting an Element from a div using nested FindElement option

I am creating a test for presenting a demo to my management and client using Selenium WebDriver in C#. In this test I need to find an element (a radio button), but for that I want to use the nested ...
2
votes
2answers
301 views

How to find frames without Name and ID using Selenium?

I'm creating some test cases using Selenium WebDriver in C# for a web application. That web application uses different frames for different elements and those frames are not having any Name and ID. ...
2
votes
3answers
571 views

Options for headless browsers for .net?

I am looking at speeding up my automation using a headless browser. I tried converting my tests to use PhantomJS but test stability took a big hit. Some pop ups don't seem to render correctly, tests ...
2
votes
1answer
43 views

Clicking a Non Existent DOM item

EDIT: I used mouse events and did get a working solution that is pretty ugly :). So I may be at a point that automating this page will not be possible. I am trying to click a popup menu that appears ...
2
votes
2answers
1k views

How to stop running selenium tests AFTER webdriver.quit()?

I have made a Windows Forms app to host my GUI for running selenium tests. When the user presses the "run test" button, it launches an instance of chromedriver and runs the selected selenium test. ...
2
votes
4answers
233 views

Selenium WebDriver not properly waiting

I am trying to download a file from a website using a webdriver. But my browser is shutting down before it was able to properly export. I inserted a wait() before I call dispose() but it is not ...
2
votes
1answer
71 views

wcf client test in vs 2010 tools

wcf client test I am using wcf test client in vs 2010 tools. First when i started tool, values came with null. I want to change value's dropdownlist with my default values. How can i do it?
2
votes
1answer
212 views

CodedUI : The Browser gets closed as finish testing without keeping for testing further steps

I'm working on a CodedUI project to check on a Web Solution. There, when Im testing for launching the site (as in launching the web URL), I am facing an issue with closing the browser as it finish ...
2
votes
1answer
71 views

Accept SSL certificates in Selenium Opera C#

I am trying to launch an Opera web driver, but whenever I go to the homepage of the site under test, I get certificate errors. I have tried using the CapabilityType.AcceptSslCertificates = true: ...
2
votes
2answers
188 views

Looking for a HEADLESS C# Selenium automatic nightly regression test solution

The WHY: I am looking for options and possible full solutions if someone has already done something similar. I am testing web-based applications using C# Selenium with VS2015 by writing tests that ...
2
votes
1answer
320 views

Downloading a file using Selenium Webdriver C# not working

I am using Selenium Webdriver with C# for creating Automation test cases and have encountered an issue i.e. not able to automate the file download windows pop-up. On doing search over web, I found ...
2
votes
0answers
2k views

Coded UI - How write code to use existing browser (if exists) otherwise launch new browser window

I am stuck badly with this piece of code. I am trying to write a code to use existing Browser if it exists otherwise launch my website in new browser window. Currently, if browser is not open with ...