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

learn more… | top users | synonyms

26
votes
4answers
4k 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 ...
5
votes
1answer
740 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
2answers
3k 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 allow` us to see information ...
4
votes
5answers
14k 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 ...
4
votes
1answer
442 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 ...
4
votes
2answers
411 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
1k 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>(); ...
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
435 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 ...
3
votes
1answer
1k 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 ...
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
2answers
2k 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
1answer
11k 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. ...
2
votes
4answers
263 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 ...
2
votes
1answer
93 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 ...
2
votes
4answers
2k 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
2k 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
579 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 ...
2
votes
2answers
3k 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 ...
2
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 ...
2
votes
1answer
2k 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 ...
1
vote
2answers
9k 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 ...
1
vote
3answers
7k views

Using Selenium (C#) how do I select an item from a drop-down list

I'm using the Selenium IDE to record my initial tests and then export them to c# and then use the webdriver. Some things that I do from the IDE don't export. I am trying to select a State from a ...
1
vote
1answer
166 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 ...
1
vote
2answers
2k views

How to configure HtmlUnit Driver

I clearly missed a step trying to get HtmlUnit driver working with my app. I am getting the following exception. OpenQA.Selenium.WebDriverException was unhandled HResult=-2146233088 ...
1
vote
2answers
824 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 ...
1
vote
2answers
5k views

Question: C# Selenium: Read rows from html table until the last row is found, and Store in array

The following snapshot is what I see when I do a view of class and Ids in using IE Developer tool. It consists of a table and inside the table there are links. I need to read all the link names, and ...
1
vote
1answer
26 views

I'm getting the exception “Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotAvailableException” even though control is available

As the title says i'm getting this exception when running my coded U.I Test. Currently i've researched and i cant pin point on whether this is an issue with IE9 or with my program or even VS itself. ...
1
vote
1answer
48 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 ...
1
vote
1answer
163 views

Wrap specflow scenario within try-catch

I have been running into a problem with the C# selenium bindings decribed here: http://stackoverflow.com/questions/22322596/ where a timeout exception is thrown occasionally while running my selenium ...
1
vote
2answers
419 views

Disable a pop up rendered in FF and not with IE

when testing with Selenium Webdriver, I'm getting an advertising pop up window with Firefox and not with IE. Actually this pop up is preventing me from doing many other tasks. Is there a way to ...
1
vote
2answers
880 views

How to create and write Excel .xls file using C#

I have few tests which run three times and their average is calculated through c# code. I am able to write the three test times and their averages to the xls file if I create the file beforehand in ...
1
vote
2answers
209 views

Sikuli wrapper for .NET..Unable to connect to the remote server

I am using a Sikuli wrapper for .NET (Sikuli4Net). Using an embedded jetty server, it exposes the core functionality of Sikuli for use within .NET projects. However, in Visual Studio, when I try to ...
1
vote
4answers
626 views

Automated Test With Image Comparison

I have a WPF application and I have a custom object (the output) with images and text. I need to check if the output has a correct format. I tried with Coded UI but, because the element is a custom ...
1
vote
1answer
1k views

How to find dynamically created elements in drop-down list based on input entered using Webdriver and c#?

I'm trying to test a page that has an input but really its a drop down list. The user enters text and then a dropdown appears based on what the user inputted. They are groups that are in the database. ...
1
vote
2answers
963 views

QC: How to get the Requirements Folder structure using OTA?

I'm trying to pull the Requirements folder structure from QC using C#. The OTA has a built in treeview for testplans but not for requirements. So far I'm able to pull all the folder under root but all ...
1
vote
2answers
874 views

Running Web and Application Automated Tests from the same Framework

I am writing automated tests for my company, and I am doing so from the ground up. We provide both desktop and web applications to our clients. After doing a lot of research and testing, I landed on ...
1
vote
1answer
564 views

Effective web driver management in Selenium2 + Grid2 + NUnit tests in C# for multiple browsers

I've been struggling with this for a while. We plan to move to a continuous integration server soon (probably TFS or Jenkins). I'm having a hard time figuring out how to efficiently manage the ...
1
vote
1answer
23 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?
1
vote
2answers
39 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 ...
1
vote
0answers
101 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 ...
1
vote
0answers
65 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 ...
1
vote
0answers
435 views

Passing session while switching control to a pop-up window

I am trying to choose a date by clicking an image which results in a pop-up window with a date picker in it.But when done through selenium the session expires and the login page appears in the pop-up ...
1
vote
0answers
261 views

How can I automate testing of HTTP requests? [duplicate]

Possible Duplicate: Is there a captureNetworkTraffic implementation in Selenium 2 via webdriver? I'm using Selenium2/C# to run automated tests of a web app. I need to test the HTTP requests ...
0
votes
4answers
943 views

Selenium - advantages and disadvantages of using Python vs C#

We currently have two teams. An automation team and also a web testing team. The automation team currently use Selenium and C# to automate tests on our web applications and legacy systems. As a ...
0
votes
3answers
98 views

Example selenium project in C#?

Does anyone know of a good place to download a selenium project that was written in C#? I've been doing automation for the past ~1.5 years and i'm interested to see what other people are doing. How ...
0
votes
1answer
27 views

How to change the Text of a IWebElement of Selenium in C#

The Title pretty much explains everything. I'm searching for a way to change let's say <h1 id="title">Title<h1> to <h1 id="title">Nothing<h1> I'm kind of desperate since ...
0
votes
2answers
85 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 ...
0
votes
1answer
309 views

How to save compiled document on Desktop using C# Selenium

Using Selenium WebDriver with C# in VS 2010, I compiled a document using automation and then I want to save the file on my desktop. During automation a new window is popping up to "save or open file". ...
0
votes
1answer
48 views

Searching dropdown contents for string

I have a simple solution to search for a string within a dropdown menu, but I would like to improve the code so it allows more options, preferable storing each option as a separate entry in a list or ...