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.
476
questions
0
votes
0
answers
20
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 ...
0
votes
1
answer
376
views
Recommendations for a beginner using Playwright in C# for Blazer app
I'm new to test automation and do not have a coding background. I need to create tests using Playwright in C# for a Blazer app. Can anyone recommend good resources to help me get started?
0
votes
1
answer
94
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 ...
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 &...
0
votes
1
answer
181
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")));
...
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?
-1
votes
1
answer
63
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 ...
0
votes
3
answers
414
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(...
1
vote
0
answers
317
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()....
0
votes
0
answers
254
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....
1
vote
0
answers
377
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 ...
0
votes
0
answers
938
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 ...
0
votes
0
answers
573
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 ...
0
votes
1
answer
366
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 ...
0
votes
0
answers
388
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 ...
-1
votes
2
answers
152
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 ...
2
votes
1
answer
599
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 ...
1
vote
1
answer
486
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 ...
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 ...
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">
<...
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("//*[@...
2
votes
1
answer
398
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?
1
vote
2
answers
485
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,...
2
votes
1
answer
623
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:
...
0
votes
0
answers
426
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 ...
0
votes
1
answer
252
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 ...
2
votes
1
answer
299
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 ...
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 ...
1
vote
0
answers
152
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 ...
1
vote
0
answers
387
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 ...
0
votes
0
answers
68
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. ...
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 ...
0
votes
1
answer
768
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 ...
0
votes
1
answer
450
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 ...
0
votes
1
answer
745
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 ...
0
votes
0
answers
299
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 ...
-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 ...
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 = ...
3
votes
1
answer
560
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)...
5
votes
1
answer
466
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 ...
2
votes
1
answer
8k
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://...
1
vote
1
answer
198
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 ...
5
votes
3
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, ...
1
vote
1
answer
671
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....
0
votes
1
answer
189
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 ...
1
vote
0
answers
416
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 ...
2
votes
2
answers
3k
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 ...
3
votes
1
answer
556
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 ...
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 ...
1
vote
1
answer
66
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 ...