coded-ui-tests

I'm unable to use ConfigurationManager.AppSettings in Coded UI

安稳与你 提交于 2021-01-29 08:09:16
问题 My code in VS2015 ultimate is: BrowserWindow browser = BrowserWindow.Launch(ConfigurationManager.AppSettings["URL"]); While using this code I'm getting error in the code and when I mouse hovered it I got this 'object' does not contain a definition for "AppSettings" and no extension method 'AppSettings' accepting a first argument of type object could be found(are you missing a using directive or an assembly reference?) . But I have provided using System.Configuration; . And this code was

Visual Studio 2012 Coded UI Testing of Web Application - Code coverage

吃可爱长大的小学妹 提交于 2020-01-23 07:24:25
问题 I have a web application. I am using VS 2012 Coded UI for testing the web application. I have recorded the test and running it, and it works fine. But the code coverage window gives code coverage of the test project only, it doesnt give code coverage of the website project and other dll project which is referred in the web project. I have added the testsetting file in the solution and selected the same. Any clue? 回答1: Couple of things to verify a) Have you added all these assemblies into the

Need help print list of strings

好久不见. 提交于 2020-01-17 07:50:10
问题 i am trying to print all innertext values for class xyz, but this is all i get printed "System.Collections.Generic.List`1[System.String] public List<String> getL1Names() { UITestControl document = browinX.CurrentDocumentWindow; HtmlControl control = new HtmlControl(document); control.SearchProperties.Add(HtmlControl.PropertyNames.Class, "xyz"); UITestControlCollection controlcollection = control.FindMatchingControls(); List<string> names = new List<string>(); foreach (HtmlControl link in

CodedUI map generated from source code

我只是一个虾纸丫 提交于 2020-01-16 00:36:42
问题 Is there a way of generating a UIMap using a WinForms source code file? (.Designer.cs) If so, can the generated file use properties (if public) from the source? (Therefore not using hardcoded strings and generating compiler errors in the CodedUI if a control gets removed). 回答1: Generating a Designer file by generating over it will loose all your recorded actions. I would suggest you separate out your UIMap to use multiple . I've been using a T4 to generate from something similar using the

Why System.Core fails to load when adding Coded UI support for Silverlight 5 application?

你。 提交于 2020-01-13 07:32:07
问题 I'm having the following problem: Trying to add support for creating coded UI test for Silverlight 5 application ([MSDN][1]). First step is to reference assembly Microsoft.VisualStudio.TestTools.UITest.Extension.SilverlightUIAutomationHelper.dll in Silverlight 5 project. Unfortunately, after the reference has been added, projects stops to compile with a number of similar errors: > Error 25 Cannot resolve reference assemblies. Please check the reference assemblies. Could not load file or

CodedUI tests - start a browser once for the entire set of tests

佐手、 提交于 2020-01-12 06:56:12
问题 I'm writing some codedUI tests in VS2010 to test a web application. I'd like to be able to open the browser once for the entire set of tests in the solution and then close it again when the tests finish. I've tried AssemblyInitialize attribute on a method, with my BrowserWindow.Launch in there, but it gives me the following exception when I run it: Assembly Initialization method OrdersGridTesting.SuiteSetup.Login threw exception. Microsoft.VisualStudio.TestTools.UITest.Extension

“Cannot perform 'Click' on the hidden control.” - Visual Studio 2012 only

試著忘記壹切 提交于 2020-01-07 03:01:08
问题 I'm recording a CodedUI test in Visual Studio 2012 and when I try to play back a simply "clik this link" recording, I get the following error. Message: Test method CancelSubmission.SubmitCancel.SubmitCancelMethod threw exception: Microsoft.VisualStudio.TestTools.UITest.Extension.FailedToPerformActionOnHiddenControlException: Cannot perform 'Click' on the hidden control. Additional Details: TechnologyName: 'Web' ControlType: 'Hyperlink' TagName: 'A' Id: 'CustomNav_lbBox4' Name: '' Target: ''

Coded ui - Read/Write values from .csv files

六眼飞鱼酱① 提交于 2020-01-07 02:12:07
问题 I have a codedui test which reads value from an .csv file. I'm using the following code: [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\testdata.csv", "testdata#csv", DataAccessMethod.Sequential), DeploymentItem("testdata.csv"), TestMethod] public void test() { String a = TestContext.DataRow["Field 1"].ToString(); } As part of my requirement, i need to capture the test results e.g. id generated and write it back again to "testdata.csv". I tried using:

Coded ui - Read/Write values from .csv files

∥☆過路亽.° 提交于 2020-01-07 02:12:03
问题 I have a codedui test which reads value from an .csv file. I'm using the following code: [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\testdata.csv", "testdata#csv", DataAccessMethod.Sequential), DeploymentItem("testdata.csv"), TestMethod] public void test() { String a = TestContext.DataRow["Field 1"].ToString(); } As part of my requirement, i need to capture the test results e.g. id generated and write it back again to "testdata.csv". I tried using:

Removing Standard Output Messages from Console Window

一世执手 提交于 2020-01-06 17:25:33
问题 I'm using vstest to execute tests on local. "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe\" "C:\Debug\Solution.dll /Tests:VerifyTest1,VerifyTest2 /Logger:trx" And over console i receive output something like this - Passed VerifyTest1 Failed VerifyTest2 Standard Output Messages: TestContext Messages: 1/29/2016 21:50:00 - START - START : [VerifyTest2] 1/29/2016 21:50:00 - INFO - Operating System - Microsoft Windows 10