coded-ui-tests

In MSTest how to find the total number of tests to run in ClassInitialize or AssemblyInitialize?

喜夏-厌秋 提交于 2019-12-24 05:29:32
问题 Using MStest - I want to find the total number of test methods which are queued for run. How should I capture this value in ClassInitialize() or AssemblyInitialize() method. Only thing I get is TestContext which has no details of total number of tests. 回答1: I actually have an answer to this one, but you have to use Reflection to do it. This method gets all of the tests in the class and runs them. Each test starts with the string "TC" for test case. -sulu public async Task RunServiceTests() {

Some elements take too long to be identified when playing your coded UI test

核能气质少年 提交于 2019-12-24 04:39:04
问题 Let's say I have an automated test case that launches Google.com and searches for a string. Launch google.com Search "Malaysian Airline" I have all the necessary properties for search field identified so that playback can find this very easy and run through it. But, when I run the test, it takes up to 10-14 seconds only to find the search field in Google.com and then searching in it. My Code is BrowserWindow browser = BrowserWindow.Launch("www.google.com"); UITestControl UISearch = new

Exposing a Custom Control to Coded UI Tests - WinForms

拈花ヽ惹草 提交于 2019-12-24 04:23:05
问题 I wrote my own custom control in WinForms. It's actually works like a TextBox, but have other methodes and extra properties that I wrote. I tried writing a very simple coded UI test for this control but faild. Every Time I select it with the Coded UI Test Builder it is shown as "Client" and not as a textbox. I cannot read or write to the text property of this control, or get or set other properties. Do you know how do I expose my custom control for testing, and getting and setting all of it

Can't get Coded UI test runs to work with multiple tabs in IE 9

被刻印的时光 ゝ 提交于 2019-12-23 22:33:00
问题 I've been using Coded UI-Tests to test my company's web pages and I've run into this problem several times lately, unable to figure out a solution. What I'm trying to do is have a coded UI test click a link on one of the sites pages, which then opens up the link in a new tab. My issue is asserting that the new page is the right page, and has the right content in it. When I run the test it will do everything else fine, it opens the link in a new tab, but the test can't seem to see whats on the

How to make waitForWebPageToLoad to work in coded ui test?

前提是你 提交于 2019-12-23 20:22:27
问题 First of all, i'm a beginner at coded ui testing and i have poor code skills but im trying to learn. Right now i'm hand coding some test cases (c#) in visual studio (the record option is not enough for me) but i can't get the waitForWebPageToLoad to work. So for example below, i click a link, enter some text and click a button. After that i would like the code to wait for the webpage to load before proceeding. What i have done now is a Thread.Sleep but that's not a good solution... ClickLink

CodedUI - Windows Authentication in Chrome Browser

爷,独闯天下 提交于 2019-12-23 06:04:51
问题 I'm using "Cross Browser Selenium Components" plugin to run codedui tests in Chrome browser. When i launch my web application, it needs windows authentication to log in to the website. How do i pass the username and password along with the URL in coded UI? Webdriver equivalent code is: baseUrl=”http://” + username + “:” + password + “@” + url; driver.get(baseUrl + “/”); But in codedui, when i execute the below code, authentication window pops up but the control does not get past browser

How do I wait for an element using the WinAppDriver in UWP?

烂漫一生 提交于 2019-12-23 04:49:17
问题 I'm currently migrating my Coded UI Tests for a UWP app to Appium using the WinAppDriver and I have come across the issue, that I can't wait for an element to show up. There is no way to wait for a element to be "ready" as the Coded UI Test from Microsoft did. In the ClassInitialize method everything works fine (data is entered on the login view) and the login button is clicked. After the click event is triggered the app shows a progress bar until the user is logged in. My problem is that I

Track WPF message box text and confirmation box 'Yes' button in Coded UI testing

我的梦境 提交于 2019-12-23 04:48:25
问题 How can we track the message from the WPF message box instead of web, also how to click 'Yes' button of a confirmation message box in Coded UI Testing programmatically? I tried the following but it's not working: for message box: UITestControl msgBox = new UITestControl(App); msgBox.TechnologyName = "MSAA"; msgBox.SearchProperties.Add("ControlType", "Text"); msgBox.SearchProperties.Add("Name", "Test cases added successfully."); bool isExist = msgBox.Exists; Assert.IsTrue(isExist); for

Run CodedUI from MTM 2013

霸气de小男生 提交于 2019-12-23 04:33:55
问题 I want to run a codedUI test case using MTM 2013 Here is what I already have so far: I have codedUI test cases to test my web application. The solution of these test cases has got nothing to do with my web application. Now I have few test cases written in MTM 2013 (initially for manual execution). Later I had plan to automate these Test Cases Using codedUI and associate these automated Test cases to MTM test cases so that I don't have to open VSTS to run my automated test cases. Also this may

Coded UI Playback - error thrown when entering text in particular textbox (w/ javaScript filtering keystrokes)

妖精的绣舞 提交于 2019-12-22 22:47:42
问题 I'm just starting to write some coded-ui tests, and I have run into a problem during playback when I try to enter a value into a textbox which is constrained to only numeric (decimal) values via a javaScript function. I've identified the script as the "culprit" because the test runs successfully when it is disabled. The value I've entered in the test is legitimate per the constraints of the function, so I don't understand why the exception is being thrown when the test runner enters it. Can