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.

2
votes
3answers
2k views

Selecting element value from drop down list with selenium using POM

I'm trying to make simple test to register in website - https://www.midomi.com/. I'm using c# and selenium but have stuck in selecting values from dropdown list using Page object model. My project ...
2
votes
2answers
314 views

Automation tool for testing integration of a Web application with a desktop application?

I am new to Test automation and would like to try my hand at automating a web application project. This web application gets its data from a desktop application (on syncing). I was thinking that ...
2
votes
2answers
300 views

Close a one windowHandler at the Webview

I am writing scripts to automate a hybrid application. On my app I have two windowHandles. For example, after performing some actions when I execute below code I get "2" windows as the windowHandles ...
0
votes
2answers
124 views

Sharing static class variables data between two Selenium classes c#

I have two Selenium C# test case classes, ClassA and ClassB. I would like to reuse a static variable VarA, defined in another static non-test ClassC. After ClassA has made a change to the variable, I ...
0
votes
2answers
85 views

Setting up an API Test Framework

I'm testing an API and I'm looking to define my payload using classes so that my program can then deserialize/serialize into any format(namely XML in my case). Below is an example of the payload <...
0
votes
2answers
677 views

how to automate KendoUI dropdown with selenium webdriver and C#

Cannot make it work, need help , I don't know how to automate KendoUI dropdown with Selenium using C#, Sendkeys doesn't work for KendoUI here is my HTML <div style="background-color: #e6e6e6; ...
0
votes
2answers
6k views

Clicking a cell in a dynamic data table C# WebDriver

The HTML I'm trying working with is below, <div id="enquiry-header-grid-SalesTransactionEnquiry-enquiry-header-grid-wrapper" class="enquiry-kendo-grid-wrapper k-grid k-widget" data-role="grid" ...
0
votes
2answers
338 views

Device emulator-5554 is not online - while executing my appium code on android emulator

[Error: An unknown server-side error occurred while processing the command. (Original error: unknown error: Device emulator-5554 is not online Im getting above error when at the middle of the test ...
1
vote
1answer
67 views

Understanding results of the cloud based load test in VSTS

As part of load testing I ran the set of same API's for several iterations with different user loads. My concern is with the total requests made against the user load. All tests were ran for 10 ...
1
vote
1answer
471 views

Can't open chrome web browser on android

I'm getting the error below when I try to open default chrome web browser on my mobile phone using Appium and c#. It opens chrome for few seconds and it get dispersed, So I can't perform my test ...
1
vote
1answer
171 views

Finding dropdown name where only the first word matches given string using Selenium

I am trying to match the first word in a drop down list with a given string. What is happening is when I am creating a new drop-down name, it is getting updated by some different name, though the ...
1
vote
1answer
88 views

Coded UI slows down in executing JS enabled fields

Coded UI test cases doesn't respond well on time if they encounter any field having JavaScript validation. Issue: Currently I am facing some issues with the time taken by Coded UI in execution of ...
0
votes
1answer
39 views

How can I turn a list of assertions into a table? C#/Specflow Selenium

I am very new to using C#/Specflow to write tests so thank you for the patience. I have a test that ends like this: Then the Details page should display the rating zip code And the Details page ...
0
votes
1answer
231 views

The name PageFactory does not exist in current context

I am using a POM in C# with Xunit as a framework, and am getting error in pagefactory for the following code: PageFactory.InitElements(driver, login); Error: "The name PageFactory does not exist ...
0
votes
1answer
51 views

Unable to locate a search suggestion element Selenium C#

Hi, I am trying to locate and click on the element that comes up in the search box when I type some name. Can someone please help me out to find & click on the name? I've use searching by XPath - ...
0
votes
1answer
160 views

Selenium, data driven testing using NUnit and SQL queries.

I am developing a Selenium Test Automation Framework for the purpose of testing multiple websites. I have currently set up the Framework in Visual Studio using C# and implementing the Page Object ...
0
votes
1answer
388 views

Selenium OnClick identify button C#

How to identify this button in C#: <button class="reward_link_redeem_button_style" onclick="RedeemRPProduct('free_points_1')">REDEEM</button> <button class="...
0
votes
1answer
261 views

Clicking flipping image in selenium webdriver using C#

New to this platform I'm a beginner learning selenium webdriver with c# but I have a problem clicking on a flipping image, I identify the id but it won't click on it. I was told to use wait which ...
0
votes
1answer
73 views

How can I solve OutOfRangeException on using Selenium C#

I was faced with the below problem while trying to run a data driving testing and have tried to resolve it but nothing seem to be working for me. Please could you take a look at my code and tell me ...
0
votes
1answer
409 views

How to run multiple test cases sequentially in NUnit Console Runner

I'm trying to run nunit3 exe through Jenkins but after building the project, it runs all available test cases parallely. They should run sequetially. I tried where clause in nunit but how it will ...
0
votes
1answer
408 views

Selenium with C# “Element is no longer valid” exception being thrown when repeating steps

I am repeatedly getting a very annoying problem when automating my test cases using Selenium/C# in Visual Studio. This test is designed around validating search criteria text. In order for me to test ...
0
votes
1answer
585 views

How to get the Indexes of all columns In a Single Row using Selenium WebDriver and C#?

For single web element in that row i got index..for multiple column in a single row how to get the index: IWebElement colelement = driver.FindElement(By.XPath("//div[@id='grdBooking']//table//tr/ th[...
0
votes
1answer
202 views

Executing appium test on kobiton device

I'm running some of my Appium test cases which are written in c# under .net platform on a real time device which is attached to my workstation. Below is my code and it works fine. public void ...
0
votes
1answer
192 views

Why is there different behavior of a Web Application with Automation and with Manual?

I am automating a website, there's web page containing few text fields, dropdowns. There is a mandatory field check for a dropdown, if I select the default option (which is 'Select') I get an error ...
0
votes
1answer
933 views

BDD specflow Error: "Ambiguous Step Definition Found For Step

I am getting this error: "Ambiguous Step Definition Found For Step...." on running my Specflow Test. The code is for the client that I am working for, thus I am not permitted to provide code sample. ...
0
votes
1answer
122 views

Error - NotImplementedException Was Unhandled

I am trying to subtract the result of 2 variables and I want to echo the result in Selenium. I am using VS2015 as my IDE. //Obtaining pressure For 2100 hours today driver.FindElement(By.XPath(".//*[@...
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 ...
2
votes
0answers
66 views

Retry in nunit not working when test times out

I am using Timeout attribute for nunit test case as below: [Test, TestCaseSource("TestCases"), Retry(2), Timeout(10000) public void test(){ // Some code that runs for more than 10 seconds } I ...
2
votes
0answers
22 views

JQuery Not working after updating NUNIT to 3.7

I have used to find an element using jQuery select0r. This is how am trying to find out the element. var linkDom = new DomElement(DomElementType.JQuerySelector, string.Format("{0} a:icontains(\"{1}\")...
1
vote
0answers
692 views

Selenium Chrome Driver: How to Load all the Frames and get the Complete Page Source?

I'm developing an web application that monitor changes in other websites. I came across some of the websites and that contain load of Frame set and Frames. I'm using the below code: var ...
1
vote
0answers
136 views

Invalid Version: android-4.2.2 error on appium

An exception of type 'System.InvalidOperationException' occurred in WebDriver.dll but was not handled in user code Additional information: An unknown server-side error occurred while processing the ...
1
vote
0answers
1k views

How do I run my C# Unit Test Cases using Jenkins?

I have prepared few Unit Test cases using Selenium-C# and MS Unit Test framework for a web application. I am using Selenium WebDriver for automation. My tests run perfectly fine when I run them ...
1
vote
0answers
342 views

Specflow CodedUI Generator Plugin not generating feature files

Okay. So here is where I am at. I am using Specflow 2.2.0 to pair automated unit testing with our CodedUI testing effort. I am developing a plugin to add the CodedUI Test attribute to the Specflow ...
1
vote
0answers
50 views

Selendroid is alwasy looking for default emulator-5560'

Im runing some of my test on cross browser and when i try to do it on Android as on below code ,Some times it gives me an error saying Caused by: io.selendroid.standalone.exceptions....
1
vote
0answers
100 views

How should Data be handled when developing automated testing frameworks?

Currently i am using C#/Selenium to develop the automated testing framework. To run the tests i developed test fixtures which still use C#/Selenium but are ran with NUnit and are separated from the ...
1
vote
0answers
200 views

Passing IWeb element to Implicit wait function

I'm following Page Object Model on my test suite. I have below method to wait for an element. public void WaitTillCssSelector(string elemantName, int TimefromSeconds) { ...
1
vote
0answers
42 views

Which test method is running/executing at the moment?

I'm on Appium with C#, I have 60 test methods written on different classes. I'm running the tests via Visual Studio test explorer. When I click run all test button at the "Test explorer" it will ...
1
vote
0answers
954 views

How to access an Input file in the shadow DOM using selenium chrome driver?

Has anyone figured out how to access an Input file in the shadow DOM using selenium chrome driver? at a certain point at the angular.js page a button is clicked and in the function triggered by the ...
1
vote
0answers
456 views

Coded UI test cases not running on 64 bit machine

I have created some test cases in Coded UI on 32-bit machine and now I have got another machine for running these test cases (which is 64 bit machine), when I executed my test cases using that machine,...
1
vote
0answers
2k views

Coded UI Test cases taking too much time to execute

Update: I used some hit and trial method for this issue and found that this issue of slowness occurs only when Coded UI (or my code) encounters any Date-Type text field. If there is no Date-Field over ...
1
vote
0answers
835 views

PDF Automation using URL opened in Selenium, not a new URL

Currently im using Selenium Webdriver for c# and PDFBox to automate the PDF text of a report. Now, using PDFBox, we have the ability to parse a pdf given a URL link, with URL = new URL("link of pdf");....
0
votes
0answers
18 views

How to select a TreeView node in WinAppDriver

So I am trying to select a node on a TreeView using WinAppDriver, any thoughts on how to find a element that will have a value I can access the element with?
0
votes
0answers
134 views

Selenium Error - The HTTP request to the remote WebDriver timed out after 60 seconds after clicking install button

while creating my test using c# and selenium i ran into a issue i haven't had before. the test basically opens the web site, logs in as admin, and within the admin page i than have to install a plugin ...
0
votes
0answers
41 views

Integrating VS 2017 C# Selenium Test Cases into TFS

Ok I am new to TFS only just got access to it in my company. I have been writing UI functional website test cases in VS 2017 using selenium and c#. I now wish to integrate these into TFS. From a ...
0
votes
0answers
71 views

Selenium C# Tests on Various Browsers

I would like to run my tests on multiple browsers but NOT in parallel. I want to provide a pop up to the user to choose which browser (IE, Chrome, Firefox) to execute all tests on when first started. ...
0
votes
0answers
83 views

Writing selenium tests againgst bootstrap Checkboxes

I have currently a big Problem to click on a Checkbox in a bootstrap designed GUI. In Html it appres like this: Does someone know how to press the Button of this checkbox? Because the controls are ...
0
votes
0answers
29 views

Why does my appium server skip my second emulator on parallel test

I have done the following: Start Selenium Grid Started 2 emulator; Started appium servers for both using appium -p --nodeconfig /absolute/path/.json Ran my script: DesiredCapabilities cap = new ...
0
votes
0answers
70 views

Dropdown is not consistent in Selenium Webdriver 3

I just updated my webdriver from NUGet this morning and I am having issues with the dropdown. Below is my code: public static void SelectDDL(this IWebElement element, string value) { element....
-1
votes
0answers
25 views

Is it possible to convert trx file to html files inside the azure build pipeline and email it to some one

I have set up a unit test project on azure build pipeline. After the test execution it will generate a trx file. I need to convert that to a nice HTML file using "TrxerConsole.exe" and then need to ...
-1
votes
0answers
20 views

How to get AWS authantication token for a unit test

I have some APIs to be test. All the APIs need authantication token need to be pass with the request header. Im using c# to test the above APIs. So, Is there any way to get the AWS user ...