Questions tagged [c#]

Use for questions about testing using C#. This can include unit tests, integration tests, UI tests. If a programmed test uses C#, and the question relates to testing rather than to code, the C# tag should be used.

Filter by
Sorted by
Tagged with
3
votes
1answer
6k 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", "pathtogooglechrome\chromedriver....
3
votes
1answer
1k 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
4k 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
5k 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
1answer
4k views

Timing Page Load in Selenium

I am working with Selenium C# .NET. What I want to accomplish is elegant, extendable page load time logging within my page object architecture. Most new pages are loaded as the result of some action, ...
3
votes
1answer
4k views

How to use .xlsx Excel files as Data Source for Coded UI test?

I want to use ".xlsx" format Excel file as Data Source in my hand coding Coded UI test. The best information I get is found in MSDN: Creating a Data-Driven Coded UI Test, which has useful information ...
3
votes
1answer
17k views

How do I extract the inner element in Selenium?

I am new to Selenium and C#, which we are using right now. I am also new to using the Page Object model, to make our codes readable. Though I am having troubles using the FindsBy, so my original code ...
3
votes
1answer
3k 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 ...
3
votes
2answers
71 views

Good way to update automation skills with experience in selenium+c#

I want to update my automation skills with experience in selenium+c# working as an Automation QA. I am particularly interested in courses in the London area or online courses I can take to remain up ...
3
votes
1answer
6k views

Sometimes Selenium doesn't click an element or clicks the wrong element

I have a number of tests which are run using Selenium and WinAppDriver. Sometimes the test gets passed, often Selenium doesn't find an element or click the wrong element even though it had passed the ...
3
votes
1answer
295 views

How does appium work on parallel tests?

I am new to mobile app testing. I am trying to understand how appium works. Basically i need to run tests parallel in both android and ios. But the scripts are written in C#. How would this be ...
3
votes
3answers
21k 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. ...
3
votes
2answers
1k views

Handle drop down on web page dialog selenium C#

I am working on automation of a website using Selenium and C#, but I am stuck in a situation where on a button click a new webpage dialog opens and on that web page dialog we have to select some value ...
3
votes
1answer
5k 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
3answers
7k views

How to check if the button is disabled

I have a problem how to check if the button is disabled. If button is disabled and I use Assert.IsTrue(driver.FindElement(By.XPath(OKButton)).Enabled, "OK button is disabled."); it is not finds ...
3
votes
0answers
1k views

Get Visual Studio (2013 Community) unit test execution messages

Hi, I'm trying to make "nice" test execution report and get next messages: Message StackTrace Elapsed time Test name and Test Outcome are easily taken as TestContext parameters, for output I'm using ...
3
votes
2answers
398 views

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

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 id="...
2
votes
3answers
1k views

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

I will switch to CodedUI from UFT for test automation and don't want to stay with VB any more. I am learning C# from Pluralsight currently and wondering how much and what level I should complete to be ...
2
votes
3answers
288 views

Automation Testing approach for Web Based Application

I am automating a website which has multiple modules and involves users of different privileges (say Admin, User Type 1 and User Type 2). I am using Microsoft's Unit Test Tool inbuilt framework with ...
2
votes
2answers
10k views

How to select an unordered list in Selenium using C#

I had been having a problem trying to select an item in a dropdown. I have checked resources online but I still couldn't get it working. My HTML is this: <div id="dropdownID"> <ul class="...
2
votes
1answer
11k 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 ...
2
votes
6answers
58k 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 ...
2
votes
2answers
11k views

Finding the Parent of an Element, then Clicking a Button Child of that Parent in C#/Selenium

I am quite stuck while testing a web application. I am trying to check to ensure a class exists - in this case the class of "originalProductPrice" - out of a group of identical looking li items. Only ...
2
votes
2answers
6k 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" class=...
2
votes
2answers
3k 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
1answer
292 views

What are the pro's and con's of writing an API test automation framework at code level as opposed to using a tool

As I look into writing automation frameworks at the API layer(relatively new to this area), a question that keeps cropping up in my mind is.....why should I write an automation framework at code level ...
2
votes
2answers
873 views

Selenium Test Suite fails to execute in Jenkins but works correctly on local machine

I have been struggling with this issue for some time and maybe someone from here has come across it and might provide me with any suggestions or solutions. I have a fully working Test Framework with ...
2
votes
5answers
8k 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
42 views

Strange exception when executing tests

I write test automation using Selenium and C#. I use the Page Object Model consistently. And have had a random bug crop up in my code: Type of member 'IWebDriver' is not IWebElement or IList
2
votes
3answers
650 views

(C#) Selenium: How to extract information from html and write to a variable

I want to know how to get the HTML tag information and write to a C# project variable. Remember that I can not change the HTML because I do not have access. In the example below, it is necessary to ...
2
votes
1answer
189 views

Errors On Launching Browser And Going To Website (In Selenium Webdriver)

@alecxe - I have edited the code. But, I still get errors. Thanks very much for your help. ========================================================================= I have done this several times ...
2
votes
2answers
7k views

(stress) testing tool for ASP.net/C#

I am a Software QA for 3 years, however, I only experienced manual testing which I act the role as end-user in the application (front-end and back-office), I am now hired in other company which I am ...
2
votes
2answers
1k views

How to implement POM for “driver.FindElements”

I was using POM for initializing my elements as below. [FindsBy(How = How.XPath, Using = "//ion-buttons[2]/button")] public IWebElement SearchIcon { get; set; } [FindsBy(How = How....
2
votes
7answers
8k views

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

So, in the AUT there's a <div> loading screen covering the entire page, which then fades out and gets replaced in the DOM by the <body>. I'm using ExpectedConditions for visibility and ...
2
votes
2answers
742 views

VS 2015: Selenium webdriver reference isn't found

I just started with Selenium and C# and came across this problem at very beginning. I've installed nuget webdriver package in project WebdriverTest, then created Unit test project in which I add ...
2
votes
3answers
11k 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
5answers
5k 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
2answers
11k 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 ...
2
votes
2answers
60 views

Selenium: How do I use the button of my HTML in WebElement?

How do I locate my button that has the text Pesquisar > in my Selenium WebElement? My HTML: <div style="font-size: 10pt; font-weight: bold">Portais </div> <hr> <form name="...
2
votes
1answer
325 views

List<IWebElement> not being populated from a local variable causing NullReferenceException

I'm experiencing a few issues with trying to create a list using List<IWebElement>from a local variable. The HTML I'm working with is below, <div id="enquiry-header-grid-...
2
votes
2answers
8k views

WebDriverWait ExpectedConditions stopped working after updating Selenium.Support NuGet

Before updating Selenium.Support Nuget, all test cases in my test suite were running correctly. When I updated the Nuget yesterday, all my test cases in which I use WebDriverWait ExpectedConditions, ...
2
votes
2answers
3k views

Selenium Webdriver - Locating element inside form

I am trying to write a webdriver C# code that checks for elements in a site. However, the site is a single page website with an embedded form. The form contents changes when you click Next. So I am ...
2
votes
1answer
764 views

What tools are available to test console applications (I/O) on Windows?

We have several exes that interact with one another and would like to use something akin to "Selenium for Console Apps". What's available in C# land?
2
votes
2answers
4k views

Error: System.NullReferenceException error in Selenium with NUnit

I'm getting following error at verification stage: "An unhandled exception of type 'System.NullReferenceException' occurred in nunit.framework.dll Additional information: Object reference not set to ...
2
votes
1answer
1k views

How to get a list of similar elements using Ranorex?

A newbie Ranorex, I come from a Selenium Python background. I can not figure out how to find an array of similar elements in Ranorex. With Selenium, we can use something like: array = webdriver....
2
votes
1answer
2k views

Improving my Unit testing: How to test simple methods that call internal methods, resulting in complex (yet similar) output

I've got data access layer that has two types of method GetLatestX and GetX. GetLatestX looks something like this: public IElementType GetLatestElementType(Guid id) { IElementType ...
2
votes
1answer
2k views

MSTest-Cross browser testing C# with Selenium?-how to run C# Selenium tests against multiple browsers

At the moment my tests are running only in Firefox, because that is the driver which initialize at last. I need to run my tests on both Firefox and Chrome. Parallel or serially. But it should be ...
2
votes
1answer
4k views

How to run same test case for four differant environments in selenium

On my project i have 4 different environment. Dev,stag,uat and prod. So i need to run a test case for all four environments as a one test case. Only the change to the code will be web driver URL. So ...
2
votes
1answer
2k views

How to run a selenium project on a different server without visual studio

I have create a selenium test suit on my pc with visual studio. I can run it by right clicking on test explorer. Now i need to run the same project on a different pc where it don't have visual studio,...