Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [c#]

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

0
votes
1answer
21 views

Testing multiple API contracts as part of 1 test

I have a situation whereby, say, I have one API which creates an employee(POST); one which then returns the employee(GET) and one which deletes the employee(DELETE). I've been using RestSharp/C# to ...
1
vote
1answer
27 views

How to test API contracts when there is a dependency on data from an outside source

I'm after some advice regarding a project I am currently working on. There is a front-end, similar to what Amazon is like in that sales are fed through the site(there is no API for doing this). ...
0
votes
1answer
27 views

How to navigate to a “Not Secured” web page using PhantomJS

I was trying to navigate to a web page which is not secured.When i try to do this using PhantomJS its not navigating the the web page, I can see it by debugging the code. So how should I navigate to ...
5
votes
5answers
94 views

Useful real-world APIs to test against

In order for me to firm up my understanding of API testing I'm looking at testing against some real-world API's. For understanding, I'm going to be writing my API tests in C#, ideally utilising ...
0
votes
1answer
23 views

Configuring OAuth2 with RestSharp

I'm looking to set up a test against the Vimeo API and have been using some of the RestSharp tests to set me up. However, since these test were written Vimeo now requirs OAuth2 rather than OAuth1. I'...
1
vote
0answers
32 views

Run Selenium Automation on Microsoft Tablet chrome browser (real device)

As a part of the Automation Test, I have to set up my test framework to run tests on Microsoft Tablet(real device), I am not sure how to connect my framework with the tablet device. please suggest ...
0
votes
0answers
29 views

C# Selenium WebDriver- Conditional statement with a “Selected” method for a checkbox is clicking the checkbox at every run (ignoring the condition)

Situation: Two checkboxes on a page: CheckboxA CheckboxB Condition: if (!CheckboxA.Selected) { CheckboxA.Click(); } if (!CheckboxB.Selected) { CheckboxB.Click(); } When the test ...
1
vote
2answers
30 views

Advice on assertions to make when creating an API testing framework

I'm currently looking at building an API test automation framework for a series of Rest Services, utilising c#. Coming from a UI-automation background I was after some advise on assertions when ...
2
votes
1answer
57 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 ...
0
votes
2answers
25 views

Deserializing JSON response using RestSharp

I'm looking for some general advice with an API framework I am setting up using C# and RestSharp as the client library. I've successfully set up an initial test, but I'm now looking at creating a ...
0
votes
1answer
49 views

C# Selenium - How to write a conditional statement with multiple elements/xpaths

I have a problem and having trouble to finding a solution. Problem Statement: Navigate to a webpage and check if three checkboxes are selected. If not, I'd like to select them (if only one is ...
0
votes
1answer
33 views

How to use the page object model pattern in C# without deprecated libraries

What can I use as an alternative option to the soon-to-be deprecated OpenQA.Selenium.Support.PageObjects library? I still want to make sure I encapsulate the elements and be able to assemble the ...
0
votes
1answer
21 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
25 views

Specflow tutorials which cover UI testing

When initially delving into the realm of BDD my initial foray was with Java and Cucumber. I found a wealth of knowledge online which allowed me to get to grips with this, specifically real-world ...
0
votes
1answer
25 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
0answers
25 views

Automated tests failing with “Method not found: 'Void OpenQA.Selenium.Screenshot.SaveAsFile'” after updating .NET

I recently updated my .NET to the newest version and all of my automated tests are failing with the following error: threw an exception: System.MissingMethodException: Method not found: 'Void OpenQA....
1
vote
3answers
66 views

API Testing tools in C#

I'm looking at writing at automated tests to cover regression testing in respect of Restful API's. I have familiarity with how to do this in Java using Rest Assured, however the company I currently ...
0
votes
1answer
49 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
0answers
19 views

Cannot run dotnet Selenium app on linux

I created a service that start my dotnet Selenium application on Linux (on Windows all works well) but when I run this command: sudo systemctl start ods.service I get: PAC Support disabled ...
3
votes
2answers
55 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 ...
0
votes
1answer
106 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
0answers
134 views

Taking screenshot and name it like failed test using selenium WebDriver

This code takes a screenshot when test fail, but name it like my class. How to named screenshot like failed test? Example: public void ClickMyAccount() fail and screenshot must be named ClickMyAccount....
0
votes
1answer
84 views

WebDriver Exception was unhandled by user code C# NUnit Selenium

Till yeaterday i.e. 17th July 2018 I was able to successfully run my testcases. But now I'm getting below error: A exception with a null response was thrown sending an HTTP request to the remote ...
0
votes
0answers
27 views

Relative path to file in NUnit test project

This is my code which testing upload and finds a path to file, located in my project’s folder. The purpose is code to be run on any machine. Project is .NET Core: IWebDriver driver = new ChromeDriver(...
0
votes
1answer
68 views

How can i get the value from a dropdown of div class in selenium webdriver?

How can i select a value from the dropdown using selenium web driver
0
votes
1answer
290 views

Unable to click button with selenium webdriver using C#

I am having trouble with clicking a button within a modal using Selenium and C#. The button is for a photo upload, and for some reason the element that is select-able (tested with JS in the console) ...
0
votes
1answer
74 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[...
2
votes
3answers
437 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 ...
1
vote
1answer
45 views

Is there a C# equivalent for @FindAll in Java

Java's @FindAll allows the user to match at least one of the given criteria e.g. @FindAll({ @FindBy(className = "class1") @FindBy(className = "class2") }) private List<WebElement> ...
2
votes
3answers
121 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 ...
1
vote
1answer
60 views

Automated test generator

After a long road with Randoop.NET as a unit test suggestion tool, my developing team has decided to upgrade to a commercial tool which will provide us a full unit testing framework for professional ...
0
votes
1answer
237 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
62 views

How to check a checkbox which is not visible?

I need to check a checkbox, but am not able to do that. It's giving the error: Element is not visible This is the element: <input _ngcontent-c5="" class="lb-checkbox ng-untouched ng-pristine ng-...
0
votes
2answers
58 views

How to Extend Automated Testing with C#/Selenium-Webdriver/NUnit Testing Past Chrome to Other Browsers?

I inherited a test automation suite that I have built a lot on top of, however I am unclear on how to migrate the current setup to use drivers past the chromedriver. I'd like to also use IE, FF, and ...
0
votes
0answers
106 views

Selenium - unable to find element- during second time

I have to use(click on ) one and the same element 2 times and there are some actions to be done in between. Unfortunately the element is not visible/displayed second time. I`ve tried localizing it ...
1
vote
1answer
103 views

Dll file is missing in my Debug folder (C#-Selenium)

I am trying to run my Automated test cases from the command line. My tests were written in C# - NUnit-Selenium-Webdriver. I opened my solution in file explorer then navigated to Bin--> Debug, but I ...
0
votes
0answers
551 views

C# Selenium ChromeDriver throwing no such window: target window already closed

Spuriously, and irregularly it would seem, I am getting this exception when trying to locate an element on a page: OpenQA.Selenium.NoSuchWindowException : no such window: target window already closed ...
0
votes
1answer
408 views

Best practices for exception handling with Selenium

I've been searching on google for best practices regarding exception handling, however I did not have much success besides using try-catch. My framework is set with a EventFiringWebDriverwhich, ...
1
vote
1answer
60 views

I am trying to validate the following in page: Unit testing text and existence of Test Automation Interface Model picture [closed]

I am using the C# selenium, Specflow and Nunit3 for performing above task. I am confused that how to validate the page. Later on, following task already i have done. Moreover, it Search for the link ...
0
votes
2answers
83 views

Unable to locate element to sendkeys C# WebDriver

im working with the following HTML <tbody> <tr class="formRow"> <td class="labelColumn"> <span id="ctl00_MainContent_lblTemplate">Template</span> </td&...
0
votes
1answer
680 views

Is there any proper way to handle Browser authentication using selenium?

Using C#, Chrome, Selenium grid and parallel tests, I have been unable to find any solution to bypass browser authentication pop up. I don't see this question as duplicate because all answers are ...
0
votes
4answers
1k views

How to Incorporate the Defunct PageFactory in Selenium with C#?

I just discovered the page object design pattern recently and really wanted to implement it into my company's UI Test Automation suite. I started to do so and immediately ran into problems which lead ...
1
vote
0answers
512 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
2answers
46 views

Launching Mozilla Firefox Browser

I am trying to launch this browser & the code worked previously: namespace AutoFramework { using OpenQA.Selenium; using OpenQA.Selenium.Chrome; using System; public static class ...
0
votes
2answers
116 views

Testcase fails when running as a Jenkins project

I have a simple test case where it asserts the Width and Height of an element. Assert.AreEqual(Height, 170, 100); Assert.AreEqual(Width, 636, 100); The test case passes when it runs using VS test ...
1
vote
1answer
35 views

Cannot use WebDriverExceptionEventArgs.ThrownException in Selenium C#

I am encountering a problem trying to use WebDriverExceptionEventArgs.ThrownException: firingWebDriver.ExceptionThrown += new EventHandler<WebElementEventArgs>(_ExceptionThrown); static ...
1
vote
2answers
276 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 ...
0
votes
1answer
153 views

What is the difference between equivalence partitioning and decision tables techniques

I need to know the different situations when can I use equivalence partitioning technique and when to use decision table technique. A lot of situation I feel that I can use equivalence partitioning ...
3
votes
1answer
119 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-...
3
votes
2answers
3k 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, ...