coded-ui-tests

How to run MTM tests on multiple product builds?

谁说我不能喝 提交于 2019-12-13 01:25:27
问题 We have MTM tests running on Release build of our product (Desktop Application). Now we want the same tests to run on two product builds: Beta and Release. When a test run is initiated from MTM (or tcm), we need a way to pass a 'value' to the test run telling it which version/build of the product it needs to test. This 'value' will then be read in the test method and correct decision will be taken while the tests are executing (like installation path, test results file updates etc). Is there

Coded UI - “Continue on failure” for Assertions

半城伤御伤魂 提交于 2019-12-12 13:20:04
问题 I'm using SpecFlow with Coded UI to create automated tests for a WPF application. I have multiple assertions inside a "Then" step and a couple of them fails. When an assertion fails, the test case is failed and the execution is stopped. I want my test case to go ahead till the end with the execution and when the last step is performed if any failed assertions were present during the execution I want to fail the whole test case. I found only partial solutions: try { Assert.IsTrue(condition) }

Writing message in Coded UI HtmlLogger output file

ぐ巨炮叔叔 提交于 2019-12-12 13:13:21
问题 I am using Coded UI for Automation testing. I have already enabled HtmlLogger in QTAgent32.exe.config file. I am getting the html output file. but I am considering to write some messages in that html output file. I used this.TestContext.WriteLine("Message"); to write output in result file (.trx) but it is not writing in output html output file. Is there any solutions to write in html file while test is running? Any help would be highly appreciated ! 回答1: I found that there is no direct way to

Finding a window when only part of the window title is known in Coded UI Tests

让人想犯罪 __ 提交于 2019-12-12 10:58:30
问题 The application I am writing coded UI tests for has a window where part of the window title is based on a random filename generated for a temporary file, so the test can only know the static part of the window title. Occasionally, when no other windows are open, the test runs fine. It is a bit problematic when other windows are open, however. If the other windows have similar controls, which window the test picks to work in is unpredictable. 回答1: I've narrowed it down to this: When searching

Error creating Coded UI Test in Visual Studio 2010 Ultimate

别来无恙 提交于 2019-12-12 08:47:56
问题 I am attempting to create a Coded UI Test in a Visual Studio 2010 test project. I right click on the project, Select Add Select Coded UI Test I then get the error warning: The following package failed to load: C:\Users[File Path Goes Here]\Microsoft.VisualStudio.TestTools.UITest.Extension.IE.dll. Coded UI Test is now in an inconsistent state. Remove this package and restart Visual Studio to work with Coded UI Test. Once I click OK, I can create the Coded UI Test (CUIT) but when the test is

How to use AutomationProperties.Name?

柔情痞子 提交于 2019-12-12 07:47:09
问题 Question Can anyone please explain (preferrably with a code example) how the AutomationProperties.Name property is used programmatically and declaratively with XAML? Explanation I understand that the Coded UI Builder in Visual Studio 2010, for instance, takes a Window's name as SearchProperty. Since my Window's name changes, I would like to have a constant SearchProperty that my Coded UI Tests can rely on. In the code example below, I don't want the window title to be hard-coded as

CodedUI Find lower level List Item without an ID?

百般思念 提交于 2019-12-12 07:02:38
问题 I am experimenting with CodedUI using C# and am having some trouble. I have got a <div> containing an ID, and then a non-uniquely identified <ul> with several <li> tags like the below: <div id="uniqueIdValue" class"long_class" activetabindex="0" sfwtabcontainer="true"> <ul class="long_class2">::before <li class="sharedListItemClass" sfwtabheader="true">...</li> <li class="sharedListItemClass" sfwtabheader="true"> <a href="#someValue">History</a> </li> <li class="sharedListItemClass"

In Codedui how to scroll a page vertically by required pixel

旧街凉风 提交于 2019-12-12 04:59:58
问题 While doing a codedUi test I want to run a simple javascript which scrolls the page window.scrollBy(0,500) . I am using VS2010. How can i achieve that. I tried a lot of native ways for scrolling web page, but none are working. Thought of trying javascript way, but don't know how to do. Only thing that worked is sending PageDown key, but that won't help me in pixel perfect scrolling. So this question actually becomes a subset of "How can i scroll a page in codedui". Any suggestion would be

Coded UI Continue on failure Assertions

早过忘川 提交于 2019-12-12 04:50:48
问题 Hi I know that what I am about to ask has been asked before by others however I am still unclear about those that has been posted online hence I am posting this Question to clarify my doubts. Hope that you guys can help me out with it. Currently I am using Microsoft Visual Studio 2013 Premium. I am using the record and play functions. I record some actions and a few verification points. Now the script will immediately stop when an verification point fails. However I want the script to

Coded UI Test Finding Controls On Expanded Row

一世执手 提交于 2019-12-12 04:38:17
问题 I'm trying to write some coded ui tests for a WPF application and have gotten to part of the application that contains a datagrid with collapsing and expanding rows. I am able to find and interact with controls on the collapsed rows fine using hand-coded tests but haven't had any luck finding any of the controls in the expanded part of the row. Using the crosshairs on such a control shows the item to be under UIItemRow, UIItemCustom (class name Uia.DataGridDetailsPresenter), and then the