Skip to main content

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
0 votes
0 answers
25 views

Data clean up in selenium

I am doing automation testing of web browsers using selenium and the test includes that i create users, add personal details, approve, recommend and the likes. how do I clean up these data that has ...
Oluwabusayomi Temitope's user avatar
0 votes
0 answers
27 views

Selenium on windows form button click event - Windows form is no longer clickable after launching web browser

I was trying to integrate a selenium test with a windows form app. Code works fine for a button click event. But after chrome driver get open I cant click any thing at the windows form application. Or ...
ChathuD's user avatar
  • 2,147
0 votes
0 answers
96 views

Is there a way to execute end-to-end testing one after the other (not multi-threaded)

We are setting up a new step on our build server to trigger E2E testing, as we did for UT. Some E2E make changes to the test database, so we encounter problems because the tests are not executed one ...
Rabskatran's user avatar
2 votes
1 answer
67 views

How to handle AB testing approach with similar page logic but different locators

I have a test suite that currently runs across different development environments. Recently a complete rewrite of the application was done & deployed to a new environment. The application looks &...
user52533's user avatar
0 votes
1 answer
187 views

Can't find a specific element generated in DevExpress

I am attempting to find an element using this code: try { new WebDriverWait(wdriver, TimeSpan.FromSeconds(10)).Until(ExpectedConditions.ElementExists(By.Id("messageGrid_TL"))); ...
Majkl's user avatar
  • 473
0 votes
0 answers
19 views

How can I check the value of object parameter inside StatusCode response?

Assume we have: return StatusCode(500, new { message= "ApplicationSettings is Null!" }); Now I want to check the message value inside my unit test. How should I do it?
Ramin Bateni's user avatar
-1 votes
1 answer
65 views

Automation of End to end Test with Selenium (for web App) and Appium (For Mobile App Testing)

We have this kind of end to end tests to automate : Log in in Web application. Follow few steps there. Do something in Web app so that logged user in Mobile App gets notification. In Mobile App ...
Ragini's user avatar
  • 99
0 votes
3 answers
429 views

Assertion on Span Tag Value (Selenium Web Driver - C# MSTest - Specflow)

I have a scenario, where I want to Assert the UI is displaying 'Active'. When debugging the assertion, I am trying different methods. This is what I started with: Assert.IsTrue(webdriver.Text.Contains(...
MJB27's user avatar
  • 1
1 vote
0 answers
325 views

Selenium + C# : How to add list value in cookies?

This is my code: IList<IWebElement> program = driver.FindElements(By.XPath("//*[@id='PnlGAPAncillaryPrograms']/table[2]/tbody/tr[1]/td/table/tbody/tr/td[2]")); driver.Manage()....
user51770's user avatar
0 votes
0 answers
260 views

Select multiple values from refreshing list with Selenium webdriver and C#

I have a list with several values. Each time I select a value, the list is refreshed. How can I iterate through the list? This is my code IList<IWebElement> program = driver.FindElements(By....
user51770's user avatar
1 vote
0 answers
387 views

Downloading design step attachments from HP ALM

I was using below code to download attachments for test cases at the HP ALM TestLab folder, But then I find out that attachments can be available at the step level too. So is there any way to download ...
ChathuD's user avatar
  • 2,147
0 votes
0 answers
1k views

Try catch not catching NoSuchElementException

kinda confused. I have a method I created to help me handle various scenarios public void WaitHandler(IWebElement element) { int i = 0; WebDriverWait wait = new ...
getCritical's user avatar
0 votes
0 answers
576 views

How to assert a line that is present on the chrome console?

Basically I am trying to automate if a player receives data from OBS. Besides manual, the best way I can think of how to automate would be to read and confirm that the player is receiving data from ...
DjNewma's user avatar
  • 43
0 votes
1 answer
390 views

android : How to fix? - ConversationToQueryExtension.isEnabledForHostApp():252 Conv2Query not enabled due to current app not in whitelist

I am trying to login android application on emulator hosted on Windows OS. Facing below error : I/ConversationToQueryExtension: ConversationToQueryExtension.isEnabledForHostApp():252 Conv2Query not ...
Narendra Chandratre's user avatar
0 votes
0 answers
392 views

Selenium IE can't find an element by XPath with "invalid selector" error

I'm getting strange error using Selenium WebDriver with IE (version 11). Here log of Selenium: D 2021-06-02 16:33:46:334 c:\projects\webdriver\cpp\iedriver\elementfinder.cpp(60) Using FindElement atom ...
Maxim's user avatar
  • 101
-1 votes
2 answers
163 views

New to automated testing (C#, Selenium/Tosca, .NET, Visual Studio)

After working 4 years as manual tester, I now want and have to learn "how to do test automation" after joining a new company. My new team is currently developing a new web app in Visual ...
Sigi Sixx's user avatar
2 votes
1 answer
623 views

Calculate the time for progress bar is finished and throw warning if it takes too long?

I am automating a file upload on a web page. The point of my automation is to check if the file upload is taking longer than expected. This is the hmtl for the progress upload bar banner: <div ...
DjNewma's user avatar
  • 43
1 vote
1 answer
531 views

How can i call classes under other different class?

This might be a very strange question, but I am not even sure how to title this question. I am quite new to C# and Selenium. I have done some coding on it and I'm quite comfortable creating a (very ...
DjNewma's user avatar
  • 43
1 vote
2 answers
3k views

SELENIUM - How to count IWebElement in IList<IWebElement> and get the position in the list

I have a problem and I don't know how to solve that... I have 5 exactly the same elements on the page (same div, same class, no id, same inner text). So I can build the XPath - where Selenium returns ...
Josef Širůčka's user avatar
1 vote
1 answer
3k views

How to check for a change in the Inner Text of an html

I have to check if a change was done in the inner text of an area on my website. Lets assume this to be the html of such page: <span _ngcontent-c1="" class="image"> <...
DjNewma's user avatar
  • 43
1 vote
2 answers
6k views

How can I solve this Exception main” org.openqa.selenium.ElementNotInteractableException: element not interactable ?, C#

driver.FindElement(By.Id("UserName")).SendKeys("test"); driver.FindElement(By.Id("Password")).SendKeys("test123"); driver.FindElement(By.XPath("//*[@...
sandy yaseen's user avatar
2 votes
1 answer
439 views

How to scan barcode using Appium?

I'm looking for approach/solution on how to scan a bar code using Appium. Is it possible through emulators? or do I need real device for this use case?
Dhiman's user avatar
  • 4,580
1 vote
2 answers
494 views

Cannot select html td link button by XPath with Webdriver

Here is my element <td> <div class="linkButton" onclick="window.open('../../Report/Reports/ViewReport.aspx?reportName=Revenue.Report','Report1','scrollbars=1,resizable=yes,...
cmotto's user avatar
  • 11
2 votes
1 answer
648 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: ...
Abraham E. Mejia's user avatar
0 votes
0 answers
430 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 ...
shashank shekhar's user avatar
0 votes
1 answer
263 views

Appium How to iterate over a listview of unknown length?

IList<AppiumWebElement> els = AppiumDriver.FindElementsByClassName("android.widget.LinearLayout"); var loc1 = els[12].Location; var target = els[1]; var loc2 = target.Location; var ...
reverse engineer's user avatar
2 votes
1 answer
303 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 ...
Sathira Padukka's user avatar
1 vote
2 answers
2k views

What is the optimal solution when there is incompatibility between Chromedriver & Google Chrome?

Error: System.InvalidOperationException : session not created: This version of ChromeDriver only supports Chrome version 85 (SessionNotCreated) I am using Google Chrome Version 87.0.4280.66 (Official ...
OA345's user avatar
  • 545
1 vote
0 answers
155 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 ...
thenewbie's user avatar
  • 119
1 vote
0 answers
398 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?) [closed]

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 ...
Narendra Chandratre's user avatar
0 votes
0 answers
69 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. ...
Narendra Chandratre's user avatar
0 votes
1 answer
1k views

Need to remove some items from a IList Selenium C#

When I execute below command I'm getting more than 3000 items to my elm variable. Then I have to pass them in to a string array. The below list contain so many blank data and there are some items ...
ChathuD's user avatar
  • 2,147
0 votes
1 answer
822 views

Run series of tests using one browser instance - Selenium web-driver c# i

I developed a series of unit tests in Visual Studio 2019, C# Selenium. How can run back to back with one browser instance? For example, the first test is going through a series of steps and creates a ...
Sarah A's user avatar
0 votes
1 answer
461 views

Not able to select option from div type listbox in selenium C#

Here the id=popupY8cuUiMiDU is dynamic.I need to get the Y value from span but there are multiple listbox with the same span attribute taking Y option. How can I select from listbox as there is no ...
N_QA's user avatar
  • 1
0 votes
1 answer
756 views

Selenium C# Locate Both Data QA Attribute And CSS Class

How do we locate both Data QA Id and CSS Class using Selenium C# ? We're trying to locate both a DataQAid attribute and also see if its class ng-invalid, (Angular Material Textbox Error) This is what ...
Artportraitdesign1's user avatar
0 votes
0 answers
317 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 ...
ChathuD's user avatar
  • 2,147
-2 votes
1 answer
59 views

Performance Testing: Flag when a UI/API test's runtime increases by x% (Selenium C# Azure)

Our team currently use Selenium and C# (and NUnit) to run UI Automated tests. All tests have been manually programmed, meaning no recorders have been used. Issue: We now have a request that these ...
Fractal's user avatar
  • 149
0 votes
2 answers
1k views

Fixing an asynchronous JavaScript timeout out issue with Selenium in C#

Background I am running the following JavaScript code using the C# bindings for Selenium: async function addTableCellClassInjector(row, tableIndex, rowIndex) { for (let columnIndex = 0; column = ...
Dodzi Dzakuma's user avatar
3 votes
1 answer
561 views

Selenium Click not working on IE11 using c#

Local Machine: Dell Latitude (i7-8650U CPU @ 1.90GHz 2.11 GHz) with 16.0 GB RAM Operating System: Windows 10 Pro (64-bit) v1909 Display Scale and Layout: 100% Running on Visual Studio 2017 (v 15.9.21)...
rsasparilla's user avatar
5 votes
1 answer
486 views

Appium : Best way to automate e-Signature scenario using Appium?

How to Automate e-Signature? I am trying to automate e-Signature scenario for iOS and android application. Anyone implemented same using Appium? Workaround : I tried to automate e-Signature using ...
Narendra Chandratre's user avatar
2 votes
1 answer
9k views

How to open new tab using selenium C#?

Here is the code I have written But it is not working Any suggestion will be helpful IWebDriver driver = new ChromeDriver(@"C:\Selenium Automation\"); driver.Navigate().GoToUrl("https://...
Gayatri Govilkar's user avatar
1 vote
1 answer
219 views

NUnit Assert.This(obj, method) for C# - where to find list of evaluation methods?

I'm an old embedded coder, new to NUnit and VS C#. I'm trying to get used to the Assert.That(obj,[EvaluationMethod]) methodology that NUnit 3.x is promoting. I'm slowly getting up to speed, but was ...
kking85743's user avatar
5 votes
2 answers
3k 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, ...
Charlie's user avatar
  • 51
1 vote
1 answer
705 views

Appium - get all elements

I have this code that works where driver is of type IOSDriver<IOSElement> string selector = "type == 'XCUIElementTypeButton'"; foreach (var elt in driver.FindElements(MobileBy....
patrick's user avatar
  • 151
0 votes
1 answer
201 views

Selenium Is Unable To Locate A Web Element – C#

I get an error message on trying to run this code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using TechTalk.SpecFlow; using ...
OA345's user avatar
  • 545
1 vote
0 answers
428 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 ...
watkipet's user avatar
  • 111
2 votes
2 answers
4k views

Specflow step is not bound even though the underlying step definitions have been implemented

Hello, the step has not been bound (hence, colour purple), even though the underlying step defintions have been implemented. In the screen shot, I clicked on "Ok". V/Studio takes me to the screen in ...
OA345's user avatar
  • 545
3 votes
1 answer
586 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 ...
Sebastian Inones's user avatar
0 votes
3 answers
2k views

Selenium WebDriver - handling authentication popups in Chrome and Edge

We have an internal web application that I am trying to automate using Selenium and BrowserStack, in C#. I have managed to use BrowserStack's 'local' functionality to get at the application but I'm ...
Moorpheus's user avatar
  • 265
1 vote
1 answer
67 views

Writing to notepad based on environment

Does anyone know of a way that I can write to my notepad file, but depending on the environment it is running on, what notepad file to write to? So for example, I've automated an account setup, as it ...
automationlife's user avatar

1
2 3 4 5
10