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.

56 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
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
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
356 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
0answers
23 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
325 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 ...
1
vote
3answers
28 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 ...
1
vote
1answer
16 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 ...
1
vote
3answers
49 views

How to find the Xpath of <Td> tag from text which lie under <a> tag of that <td> in selenium c#

I have to find text on a page, which I did. Now I need to find the xpath of the <td> element containing that text so that I can use the <td> xpath to find other elements like the image ...
1
vote
3answers
816 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; ...
1
vote
0answers
739 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
144 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
71 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
363 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
511 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
55 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
105 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
232 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
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
176 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
474 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
1answer
91 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 ...
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
908 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
25 views

Injecting test data into testcases from async functions through NUnit TestCaseSource attribute

I am creating a test automation framework in C# with NUnit, and I want all my testcases to run with a clean user. Fortunately, developers have already implemented a REST API which accepts POST ...
0
votes
0answers
19 views

Getting Appium integrated with BrowserStack behind a proxy

I'm trying to get Appium WebDriver integrated with BrowserStack, using C# behind a corporate proxy server and am having trouble. I'm using CNTLM due to the proxy server, so am trying to point Appium ...
0
votes
2answers
87 views

Element is not clickable at point (x, y) because another element obscures it - BLOCK UI class

When I run my test, I receive an error because an element obscures the element I want to click. How do I create a wait that will be executed only IF this class is detected, wait it to disappear and ...
0
votes
1answer
24 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
1answer
70 views

Why doesn't my XPath find my element on the page?

I am trying to retrieve the content of the header and each chapter which is a repetitive structure as you can see below. For this am using Selenium and C#. My attempt, using xpath, is this: string ...
0
votes
0answers
25 views

Firefox opening wrong profile with selenium c#

I'm using selenium 3.14 with geckodriver 0.24, I'm using following code to run the existing profiles I have already created for my different accounts. FirefoxOptions firefoxOptions = new ...
0
votes
0answers
412 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
62 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
1answer
442 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
0answers
140 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
125 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
42 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
3answers
203 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
1answer
64 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
201 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
638 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
2answers
87 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
1answer
298 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
88 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
503 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
501 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
688 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
2answers
8k 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
1answer
233 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
207 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 ...