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
1
vote
1answer
746 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 ...
1
vote
1answer
1k views

How to fail NUnit test by default (I want to call Assert.Pass when it should pass)

I have medium level experience on unit testing and now I'm learning about NUnit. As far as I can see, a NUnit test passes by default if you don't call Assert.Fail method. In my test case, I want it ...
1
vote
1answer
2k views

What is the simplest way to rewrite Postman requests to C#

I have made lots of made Requests in JSON in Postman. Now I am thinking about re-write all the Postman-tests into C#. There are many different Nuget packages that could be used. I have googled a ...
1
vote
1answer
420 views

Adding DateTime.Now; to a URL for a test in Selenium-Webdriver and C#

I am trying to navigate to a specific URL as the Given statement for an automated test case and use a DateTime.Now structure to insert a required date into the URL for the browser to navigate to, ...
1
vote
2answers
4k views

Selenium iterating through list C#

I need to create a simple loop that iterates through a list of options in a list container and searches for a specific option. When the text is found it should scroll down to that option so it's ...
1
vote
1answer
64 views

Organizing NameMapping for a ton of objects

I would like to hear your opinion on how I am organizing our large amount of Elements found in our web application. Currently we are using selenium to run functional test cases. Our test cases reach ...
1
vote
3answers
776 views

Microsoft Dynamics 365 Sign In button can't be clicked by Selenium until mouse move action is performed

I'm trying to create a login test for Microsoft Dynamic 365. I am able to fill in the login form fields, but the Sign in button is disabled until the user moves the mouse cursor https://www....
1
vote
2answers
92 views

Count dropdown menu items

In my case, I choose a file and I open the drop-down menu. In the drop-down menu are three actions: Add tag Remove tag Lock document I use "Lock document" action and after that if I choose the same ...
1
vote
1answer
1k views

NUnit3: Log assert description when it fails

On test failure Nunit will only show evaluated expected and actual conditions. There is no way to tell which Assert failed if you have multiple asserts Expected: True But was: False I know that we ...
1
vote
2answers
3k views

How to click on elements which “Displayed = False”

I was trying to click on a element by finding it using classname But i got an error saying element is not visible. Then i debug the code and saw "Displayed = False" . But the element is fully ...
1
vote
2answers
403 views

How best to validate functionality using the console log?

Please focus on the area highlighted in red. As shown, when I try to do a search by typing "7396198", the "Loading content. Please wait" never disappears, so search is not working. I can do an ...
1
vote
1answer
571 views

Selenium IwebDriver pasing thru a method

Below is my code , and it works fine public static void WaitTillthisclassName(string elemantName, int TimefromMSeconds) { WebDriverWait wait = new WebDriverWait(Driver, TimeSpan....
1
vote
1answer
132 views

Selenium test reporting, my way [closed]

Below is a sample test case which I wrote on my test suite. In my project i need to be more focus on test reporting, so I thought in storing the test Pass / Failed status on SQL data table. Then I ...
1
vote
1answer
1k views

Specflow Page Object Model Maintainability

I was wondering if anyone could assist in a Code Review on my Specflow Page Object Model code. I have included a small sample of the code I use, most of the pages follow identical patterns. Step ...
1
vote
2answers
8k views

Selenium Driver Service Not Found Exception

Good Afternoon All, I am creating a testing framework for a web app utilizing Selenium Web Driver and Visual Studio by way of C#. I have created a solution that includes two projects. The first ...
1
vote
1answer
745 views

Sikuli Integrator C# - How to change the dircetory of SikuliOutputLog.txt?

I'm new with Sikuli Integrator in C# using Microsoft Visual Studio. May I kindly know how to change the directory of the SikuliOutputLog.txt?
1
vote
5answers
4k views

Im unable to locate the element to enter the text in the txt box in c#

i tried using xpath, Id to find elements. even though im getting the error "unable to locate the element" please can anyone help? HTML Snippet <input type="text" value="" maxlength="256" id="...
1
vote
1answer
2k views

Selenium 2 Webdriver: Persistent cookie browser restart

I test a OAuth 2 Login page. It allows me to remember my login. This is done with a persistant cookie. Now I want to test if this cookie remains present after a browser restart which is its intent: .....
1
vote
2answers
4k views

How to verify if a button is not clickable in Selenium (C#)?

Can anyone suggest a good method to use when you want to check if a element is NOT clickable. In one of my scripts, I'm trying to verify that a button clickable until a certain action is taken on the ...
1
vote
1answer
350 views

Running parallel scripting in Selenium Web driver for Firefox, do I need Selenium Grid?

I have a process, using Selenium Web driver for Firefox, for automatic look up for information on one specific site. Due to the volume of the data being looked up, I will need to run parallel ...
1
vote
1answer
733 views

Not able to click Left Navigation icon using Coded UI

I am using Coded UI for creating Automated test cases and have encountered an issue. There is a menu icon inside on the Homepage and clicking on this icon will expand the Left Navigation, so that user ...
1
vote
3answers
2k views

Handling Popup using selenium - how to switch back on parent window from child?

So I have to upload a document, and the popup for file explorer loads and my code can find the document I need, but how do I then switch back to my original browser? Here is the code: driver....
1
vote
1answer
3k views

How to select from drop-down list in selenium c# by specific attribute value?

<ul class="options"> <li data-raw-value="smt-b1bbdd96-f135-48ae-8744-e920942dd7a3" class="selected" data-sys-status="running">3. LIELA LEGAL SISTĒMA ( EN - LV )</li> I want to ...
1
vote
1answer
158 views

C# Web Driver Page Object Framework: Retrieve Dollar Values from a <td> using class identifier

I am creating an C# / Web Driver automation script that uses a Page Object Framework. I would like to check certain dollar amounts on a page (premium and tax amounts) and verify that they are correct....
1
vote
1answer
2k views

Handling multiple Iframes with same name

I am trying to navigate on a web browser that has multiple iframes that are all tagged with the id of "InlineDialog_Iframe". When I try to switch to the window I get a stale reference exception, which ...
1
vote
2answers
2k views

Verify grid data in selenium webdriver using c#

I am new to selenium. I want to verify data shown in grid on my web application page with database value. I have gone through blogs, and what I have found is: Using Selenium Webdriver in C#: i. ...
1
vote
1answer
959 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
8k views

Selenium : How can I scroll to an element in an iFrame

I have an element that is out of view when I am using Selenium within an iFrame. I have switched the context using Driver.SwitchTo.Frame("frame_id") and I am able to interact with elements that are ...
1
vote
5answers
16k views

Counting the number of browser windows opened by Selenium

Is there a way to get a list of opened browser windows using Selenium? I want to use this to count the number of open browsers within a test.
1
vote
3answers
2k 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
2answers
4k views

Selenium WebDriver - How to clear RadEditor content

I am working to write some Selenium WebDriver scripts that work with Telerik RadEditor controls. I can successfully enter content into the RadEditor in the following way with C#: Driver.FindElement(...
1
vote
2answers
4k views

Selenium element not selectable for a kendo ui element

I am having an issue with an element which works with a mouse click and there are some items from which one has to be selected but its unselectable is set to on. Whenever I try to select the elements ...
1
vote
1answer
615 views

Need to validate compiled document using C# selenium in VS 2010

I am using selenium, C# at this point I am able to compile word document and then need to save as a pdf on desktop and then validate the links in the downloaded document with original parsed document, ...
1
vote
2answers
3k 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
1answer
1k 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
54 views

(C#) Error in Loop for with If in a string search [closed]

Even finding the desired value in the register vector displays the message "TP não encontrado". I need that when the value is found it does not display the message that was not found. for (int i = 0; ...
1
vote
1answer
469 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
1answer
131 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 ...
1
vote
1answer
78 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> ...
1
vote
1answer
105 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 ...
1
vote
0answers
700 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
1answer
48 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
0answers
139 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
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
5k views

How to set socks5 proxy for Selenium ChromeDriver C# or Java? [closed]

I am trying to setup a socks5 proxy in ChromeDriver. I have used the below code for setting that up in C#: var options = new ChromeOptions(); var proxy = new Proxy() { Kind=ProxyKind.Manual,...
1
vote
0answers
191 views

C# Tools for Model Based Test [closed]

I am new in Model Based Testing. Can you advice which tools can be used to develop Model Based Test in C#. Is it normal to use NModel? Or it's obsolet? What tools is used now?
1
vote
0answers
347 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
1answer
481 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
0answers
51 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....