coded-ui-tests

Cannot run Coded UI tests as different user on Windows 8.1

随声附和 提交于 2019-12-11 11:36:45
问题 We have a Coded UI test suite which depends on running our tests as different users. We accomplish this by using the following ApplicationUnderTest.Launch overload: ApplicationUnderTest.Launch(browserLocation, null, url, username, GetSecurePassword(password), domain); We use Visual Studio 2013 premium (update 3) and had no problem when running on Windows 7 and Windows 2012 R2. Now we have migrated to Windows 8.1 and we are no longer able to run as a different user. We get the following

CodedUI not recognizing HtmlControl when searched within scope of UITestControl instead of BrowserWindow

爷,独闯天下 提交于 2019-12-11 10:54:10
问题 In our Page Object Model for Page we initialize a Container in the constructor and we define a HtmlEdit called MyTextBox and a method that uses this text box to search. public class Page { private readonly UITestControl _container; private HtmlEdit _myTextBox; private const string MyTextBoxId = "MyTextBoxHtmlId"; protected Page() { } protected Page(Process process) { CurrentBrowser = BrowserWindow.FromProcess(process); _container = CurrentBrowser; } public UITestControl Container { get {

Recursively locating a UIElement with InnerText in C#

落爺英雄遲暮 提交于 2019-12-11 08:16:32
问题 I have a number of HTMLDIV on a page and I am trying to locate a particular one using the UIElement.getProperty("InnerText") The problem is I never know how many children the DIV will have and how many levels down the element will be. So I though recursion would work for this situation rather than nested FOREACH statements. However as my DIVS do not have a .NAME property populated and .GetType is always 'HTMLDIV' I don't know how to access the .Innertext of the child element. I was going to

Wizmo5 flexgrid not rendering completely in browser when seeing through developer tools

别说谁变了你拦得住时间么 提交于 2019-12-11 06:57:44
问题 Using coded-ui-tests to automate a screen which is using wijmo grid with scroll. The problem is not able to record all the cells, as the cells which appear after scroll does not render in DOM, this is evident from Inspect element feature of browser. How can I catch the cells? Edited: The issue here is that only the cells which are visible is getting rendered in dom as we can see, while the part of the grid which is on right i.e. which will appear after scrolling is not getting rendered. The

Ordering Coded UI tests and Results in Test Manager

北战南征 提交于 2019-12-11 03:35:45
问题 I have a series of CodedUI test methods that make up a single test case. The test methods need to run in order (IE testmethoda runs then testmethodb and then testmethodc) and I want the results to show up in Microsoft Test Manager to look like testmethoda passed, testmethodb passed, testmethodc failed. Is there a way to do this while being able to run multiple iterations of the overall test case? I have tried are putting the test methods into a single test method and calling that. This gives

LabDefaultTemplate-> ExecuteRemoteTestRun2 doesn't take in account the Order field of the test in the MTM

末鹿安然 提交于 2019-12-11 03:17:32
问题 The Scenario: Create 2 codedui tests. First Test will be Test1 and the second Test2. Create 2 test cases in the mtm. Create 2 suites in the MTM. Suite1 and Suite2. Add to Suite1 the tests in the following order, Test1 then Test2. Add to Suite2 the tests in the following order, Test2 then Test1. Now create a build with the template "LabDefaultTemplate" In the Tests add Suite1 and Suite2 Now Use the MTM and change the order of the tests in the suites and run the build again. The Test Agent run

Coded UI Testing with more than one UIMap.Designer.cs?

南笙酒味 提交于 2019-12-11 02:34:10
问题 I started with Coded UI Tests. So far so good, but I have one concern about the file UIMap.uitest. Since I have to create many test scenarios, means many cs files. The more files I have, the bigger the UIMap.uitest is, because it keeps regenerating the code all the time. My question is that it's possible to have/create each UIMap.uitest for each cs file, respectively? I am using VS2010. Thanks 回答1: Yes. Look for information on "multiple ui maps". The general approach is to right-click in

Read text from textbox in Coded UI Tests

邮差的信 提交于 2019-12-11 02:20:02
问题 There is a bug/limitation in the Coded UI Test WinEdit class: when overriding the OnKeyDown method or subscribing to the KeyDown event in a text box, it is not possible to use the WinEdit.Text property. That is, when you have this... private void myTextbox_KeyDown(object sender, KeyEventArgs e) { // ... } ...this won't work: var edit = new WinEdit(ancestor); edit.SearchProperties[WinControl.PropertyNames.ControlName] = "myTextbox"; edit.Text = "New value"; // This doesn't work I've found a

Coded UI Test_C#_manual_intervention

佐手、 提交于 2019-12-11 01:33:29
问题 I want to intervene execution of a coded UI test in C# by keyboard or mouse interactions. For example I would like to pause a test by pressing Tab key and continue to it when I press Tab key again . Thank you very much in advance. 回答1: Since you mentioned in a comment that you want to pause the test in order to do other things on your computer, I agree with Coding Nawab's answer of setting up a virtual machine on your computer and running the tests on that. As long as the test is running on

Error when executing visual studio unit tests without installing visual studio using command line

守給你的承諾、 提交于 2019-12-11 00:45:09
问题 I want to execute visual studio unit tests without installing visual studio . To achieve this , I made some registry changes and copied the dll's required in a folder with MSTest.exe file . But when I try to execute the test using a command line "mstest /noisolation /testcontainer:TestProject1.dll" it showing the below error. C:\Tools\mstest>mstest /noisolation /testcontainer:TestProject1.dll Microsoft (R) Test Execution Command Line Tool Version 10.0.30319.1 Copyright (c) Microsoft