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.

62 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
1k views

Get Visual Studio (2013 Community) unit test execution messages

Hi, I'm trying to make a "nice" test execution report and get the following elements: Message StackTrace Elapsed time Test name and Test Outcome are easily taken as TestContext parameters, ...
3
votes
2answers
760 views

Test Automation for different user roles within an application - Selenium and C#

I was a developer a long time ago and have been tasked with our teams automated testing with Selenium and C# for our web application; Our application has many roles a user can be; such as an admin, ...
3
votes
1answer
202 views

Running Selenium not under a Testing Framework

I've been using Selenium for a while but with a slightly different scope (actually constraints). Instead of running a test for a particular site, I'm interested for instance in filling in a web form ...
3
votes
5answers
539 views

How to select option in a dropdown when the html-tag has a random id

I have a problem how to select a desired option (e.g. From, To...etc.) from list if 'datalist id' and 'select name' are randomly generated. This means that the ID and name has another value after ...
2
votes
0answers
982 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 ...
2
votes
0answers
31 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}\")...
2
votes
2answers
508 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 ...
2
votes
3answers
3k views

Selecting element value from drop down list with selenium using POM

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

Browser is closed only if test passed on VM

I use driver.Dispose(); and using ChromeDriver. But the browser is closed only if the test passed. On the VM if a test failed, the browser is still open. If I run tests from Visual Studio on local ...
1
vote
0answers
35 views

Two way authentication okta testing?

I am not sure if this is possible. I was task of getting an access token from okta. The problem is okta is using a two way authentication system where it will send a push notification on your phone ...
1
vote
0answers
123 views

How do I make a custom logger for Fluent Assertions?

I'm using NUnit and Fluent Assertions for testing. I'd like to write a custom logger for my test steps which shows which steps have passed and the step (if any) that failed. It looks like someone has ...
1
vote
1answer
2k views

Access is Denied Issue thrown at ChromeDriver Initiation step

Azure DevOps is triggering and running tests on a VM. All my tests are working fine on local machine. On VM, While trying to launch Chrome browser using ChromeDriver and WebDriverManager, tests are ...
1
vote
0answers
112 views

Android app get forcely closed just after the splash scree - Appium C#

I have create a small test script to open a app and fill some data at the screen. This test works fine with android 5 on Appium server 1.4.16.1 But no I need to run the same test script on a android ...
1
vote
1answer
149 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 ...
1
vote
3answers
2k 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 drop-down with Selenium using C#. Sendkeys doesn't work for KendoUI. Here is my HTML: <div style="background-color: #e6e6e6;...
1
vote
0answers
162 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
2k 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
1answer
2k 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. ...
1
vote
1answer
78 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
0answers
390 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
63 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
111 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
285 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
43 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
1k 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
1answer
205 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
0answers
512 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
1k views

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

Currently, I'm 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
6 views

XUnit test standard output gets truncated on Visual Studio

When I run Xunit tests via Visual Studio’s Test Explorer and click on the “Output” link, a new tab with the test’s log is opened in Visual Studio. The log is truncated - the following message appears: ...
0
votes
0answers
22 views

How to run appium tests parallel in c# specflow?

I am new to C# and Specflow. I am using appium, c# and specflow for automating my tests. I have a app.config file where i am mentioning the environment to be run into. A driver class DeviceDriver.cs ...
0
votes
0answers
14 views

vsdiagnostics profiling missing expected information

I'm trying to profile a command line C# application (VS 2019) on a remote server with no VS installed. I'm following the procedure here. The application depends upon a couple internal libraries that ...
0
votes
0answers
28 views

Are there any open source c# based fuzzy input generators?

I'm looking to do fuzz testing with my inputs. The entire stack I'm testing is impliment in c# so I'm really not worried about memory management type errors, I just want to find scenarios where we ...
0
votes
0answers
47 views

Azure:build pipeline:Error The type or namespace name 'XXXX' could not be found (are you missing a using directive or an assembly reference?)

I am trying to build task in Azure pipeline. Observed error : The type or namespace name 'XXXX' could not be found (are you missing a using directive or an assembly reference?) Please let me know if ...
0
votes
0answers
22 views

Azure + Appium + C# : While creating azure pipeline I am getting error “You are not authorized to access https://dss-hps.visualstudio.com.”

I am trying to create Azure pipeline to integrate automation. Observed error : You are not authorized to access https://dss-hps.visualstudio.com. Please let me know if anyone face/fix this issue. ...
0
votes
0answers
24 views

Is there a way to automatically create Azure Dev Ops test cases from a test assembly or from a solution with test scripts?

Is there a way to automatically create Azure Dev Ops test cases from a test assembly or from a solution with test scripts? With TFS 2015, I know that you can automatically create cases using the tcm....
0
votes
0answers
67 views

Sikuli4Net is giving me an error on C# selenium

I was trying to implement image based verification on my selenium project with the help on Sikuli4Net. After following some tutorials I'm getting an error as below. The request was aborted: Could not ...
0
votes
0answers
22 views

How to handle excel - multiple sheet integration with ODBC driver in C#

I am having one issue in fetching data from excel sheet where I have 4 sheets in one excel file and all sheets have one same unique Key value Issue I am facing is that - I want to fetch data from all ...
0
votes
0answers
22 views

“NoSuchElementException” is thrown even if the element is present and loaded properly

I have a code that checks for an element first before proceeding with taking a screenshot of the page, it won't stop the run but it will throw a runtime exception if the element is not found. At first ...
0
votes
0answers
76 views

Get the locator from IWebElement

I'm doing the following: var locators = new ByChained(By.XPath("//div[@id='historyModal']//div[@class='modal-body']", By.ClassName("historyItem")); var historyValues = WebDriver.FindElements(locators)...
0
votes
0answers
68 views

NUnit - Get name of test fixture in OneTimeSetUp?

Is it possible to get the name of the test fixture in the OneTimeSetUp method? I can see how to get the currently executing test easily enough (TestContext.CurrentContext.Test.Name) but is there an ...
0
votes
2answers
144 views

Testing multiple browser configurations via Selenium WebDriver

When covering cross-browser testing using Selenium WebDriver, how do you provide the browser and version information to the tool (e.g. BrowserStack, Sauce Labs)? For example, you're wanting to execute ...
0
votes
1answer
462 views

How to generate report using extent reports in Page Object Model in C#

I have created a POM framework using NUnit in C#. I have created Reporting.cs file which creates reports for the test in that class. How I can generate reports for all tests in different classes ...
0
votes
1answer
1k views

Unable to connect to Remote Server using Selenium Chrome RemoteWebDriver

public static IWebDriver UserMultiUserSignIn (IWebDriver driver, string port, string hostName, string password, string Username) { string name = Dns.GetHostName(); ChromeOptions Options = new ...
0
votes
1answer
123 views

Run Selenium test case in time interval from a console application c#

how to create a console app - a batch file which will hit my Automation testing application and runs selected test cases. I have test case with code coverage and it runs from my visual studio . and ...
0
votes
1answer
51 views

How to insert data into the excel using LINQ in Selenium C#?

For a login check case-> how to insert data into the Excel sheet after each login is checked whether the login credentials are valid or not using LINQ in Selenium C#.
0
votes
0answers
1k 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
280 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
79 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
1answer
404 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 ...