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
3answers
27 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 ...
9
votes
4answers
9k views

How to disable infobar from Chrome

The option to disable infobar "Chrome is being controlled by automated test software" was removed from Chrome. Chrome version: 65.0.3325.146 Chrome driver: 2.36 OS: Windows 10 I used the ...
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 ...
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
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
3answers
120 views

C# element not interactable

I am unable to click login form element below site: http://www.w-trading.co.kr/member/login.php? I try: driver.FindElement(By.XPath("//*[@id='memberId']")).SendKeys("my_id"); and driver....
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; ...
2
votes
2answers
1k views

What is the use of section in siteprism? Is it similar to page object model of selenium webdriver?

I have been doing selenium automation in C# for almost 1 year. I need to learn siteprism using capybara. When I was going through the documentation of siteprism i can't relate section with page ...
0
votes
1answer
37 views

Teardown of Multiple Threaded Tests with Selenium

I'm trying to run multiple test cases with Nunit in C# in which every test needs its own Selenium Chrome Driver. Before it was threaded, I handled the chrome driver with [Setup] and [Teardown] like ...
0
votes
1answer
637 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
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 - ...
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 ...
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 ...
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 ...
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
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
2answers
62 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
102 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?
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 ...
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 ...
0
votes
1answer
1k 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
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 ...
3
votes
1answer
78 views

Launch web driver without instaling it?

I was trying to launch a PhantomJS browser and it works on Azure VM. (I just point the PhantomJS.exe and it works) Then I try to launch a google web-driver and its asking me to locate the google ...
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
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
3answers
49 views

Trouble deleting NaN in input field

I'm using Selenium to fill in a web form. The fields there have their default values, usually it's 0. If I issue the command Driver.chrome.FindElement(By.Id("ID_of_my_element")).Clear(); the value ...
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
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
14 views

How to identify java script variable change in selenium C#

As on the below I’m having a HTML page where it change the variable value at the run time. So the java script is to change the isrendered variable to true after 10 seconds. Even after I inspect the ...
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
3answers
86 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
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 ...
0
votes
2answers
375 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 ...
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 ...
4
votes
2answers
24k views

Selenium Webdriver, C# and accessing rows in a table

There's been other questions like these, but I feel like I'm missing some of the basics, so I'll try asking a potential duplicate question: How do I get/list the contents of each row in a table like ...
0
votes
1answer
128 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(".//*[@...
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
2answers
42 views

Output Contents of an Element?

I am currently creating a tool. That will login into my Krispy Kreme account and then output my saved address. I am currently at the stage where I have managed to use the tool and : log into the ...
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
2answers
57 views

Unable to select <li> element from a <ul> list

How do I select a "li" element from a "ul" tag list? This is my current code vtenants.VT_USDelselectfld.Click(); //Clicks field to display the dropdown Thread.Sleep(500); IList<IWebElement> ...
1
vote
1answer
35 views

Specflow plus evaluation version attaching a screenshot

Is it possible to attach the screenshot in the report with an c#, specflow auto framework. I have included report template in .srprofile As mentioned in https://specflow.org/plus/documentation/...
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 ...
2
votes
1answer
167 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 ...
1
vote
1answer
3k 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
1answer
441 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 ...
1
vote
1answer
915 views

C# Selenium WebDriver Foreach not working

This is my code in C# I press the delete button and open a pop up where I select the amount of deletions that I want to delete and press again on delete it will delete. PropertiesCollections....
0
votes
4answers
111 views

How to find broken links using Selenium C#? [closed]

Script for testing broken links using Selenium C#.
1
vote
1answer
65 views

Closing Driver after all test are runned

I'm using Nunit + .NetCore 2.2 in my project and I need to close the browser only after running all the tests and not after each test class. Currently the tests are closing the browser after each test ...