coded-ui-tests

Can i change path of TestTools.UITest.Dll in wpf?

怎甘沉沦 提交于 2019-12-12 04:22:56
问题 Hi sorry for that question but, it is possible to change location reference OF TEST dll??? I have VS 2015 enterprise, i copy all DLL test in my subversion folder, add the reference but VS don't change the path... the path is alwais : "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.TestTools.UITest.****.dll could you help me please? path issue 回答1: The best way I've discovered is to collect your required .dlls and package them together

How can I attach an image to TRX (Test Result Reported) File?

↘锁芯ラ 提交于 2019-12-12 04:17:17
问题 I would like to my test takes screenshot when an error occur. I can write like this: TestContext.WriteLine("aaaaaaaaa"); But how can I attach an image to a .TRX file? Test Result Reported (.TRX) 回答1: Images of controls and of the entire desktop can be taken during a Coded UI test. They are captured as normal Image objects and can then be saved or otherwise manipulated in the test. The files can also be attached to the test results. The code below gives some ideas on the code that can be used.

Coded UI: App gets closed after each test even with CloseOnPlaybackCleanup set to false

十年热恋 提交于 2019-12-12 03:38:46
问题 Visual Studio version: 2013 premium Update 4 Created a couple of test methods: Login() amd Logout() CloseOnPlaybackCleanup set to false on ApplicationUnderTest object after invoking the App. Created an ordered test with both the above methods added to it in that order. When the Ordered test is invoked, the the Login method works fine and then the App gets closed. Then the Logout method runs and fails with an error that the Window is not found. Note: The ApplicationUnderTest object has been

how to assign value(from excel) in Wintable row through coded UI

一曲冷凌霜 提交于 2019-12-12 01:59:56
问题 Enter code here .. I am trying to automate application through coded UI. I am stuck at this point: Application has Table(ControlType : WinTable) and it is divided into 7 rows(ControlType : Row) like this: FilePath : C:\test.txt Printer Name : xyz .. .. According to requirement, value of "FilePath" will take from excel sheet and same for "Printer name". Here is the code: WinWindow winP = new WinWindow(); winP.SearchProperties.Add(new PropertyExpression(WinWindow.PropertyNames.Name, "Create

Console App to start a CodedUI test

杀马特。学长 韩版系。学妹 提交于 2019-12-12 01:39:22
问题 I have a coded ui test that I want to start by using batch, its a .dll file. The reason I'm calling it from a batch file is that the server has to be restarted before this test can be carried out. Is it just a simple call test.dll or do I have to do other stuff? Update Code Found Playback.Initialize(); TestProject.CodedUITest1 coded = new TestProject.CodedUITest1(); coded.CodedUITestMethod1(); Playback.Cleanup(); Take from Here, Its missing two reference addings from the private assemblies:

How to get a HtmlElement by Id

若如初见. 提交于 2019-12-12 01:21:57
问题 Need to find a HtmlElement by Id (coded-ui). I got a BrowserWindow. Can find a specific element (table, cell, button, etc.), but not just an arbitrary element by its Id. E.g., the following h3 (in real life the h3 is part of complex table cell. We don't need the cell, we just need the header). <html> <body> <h3 id='check'>Check this text!</h3> </body> </html> Anybody an idea how to do this? Thanks in advace! Gerard 回答1: After you've recorded the steps you desire on your [TestMethod] , you

Renaming test results of UITestActionLog files or folders as the test case name

天大地大妈咪最大 提交于 2019-12-11 22:02:43
问题 Really appreciate your help Adrian. I was able to add the .settingfile, how can I change the generated folder name as the testcase name , lets say I have my testcase as test1(){} I want the result folder to be named as test1 as well? I Select the option on the general tab and define the User_defined Scheme , but what ever I write there appears on my test result folder, I want it to be the name of my test case In coded UI, we need to rename the test result UITestActionLog files or folders to

MyTestInitialize() and MyTestCleanup()

柔情痞子 提交于 2019-12-11 12:32:08
问题 [TestInitialize()] public void MyTestInitialize() { Playback.PlaybackSettings.WaitForReadyLevel = WaitForReadyLevel.Disabled; Playback.PlaybackSettings.ShouldSearchFailFast = false; Playback.PlaybackSettings.DelayBetweenActions = 300; Playback.PlaybackSettings.SearchTimeout = 30000; Playback.PlaybackSettings.SearchInMinimizedWindows = false; } [TestCleanup()] public void MyTestCleanup() { Logger.CreateResultFile(ResultsLog, TestCaseInfo); } Is there a way that everytime i create a new codedUI

CodedUI : PropertyNames.ControlName doesn't work

喜你入骨 提交于 2019-12-11 12:14:24
问题 I'm searching for a customcontrol in a generic way, so I can re-use the function to find other customcontrols that match this one. Screenshot of the properties It has a Name and a ControlName. The name property will not always be filled in correctly, the ControlName will be! When I look for the customcontrol like in the code below, he will locate and perform the requested actions. WinGroup group = new WinGroup(this.window); group.SearchProperties.Add(WinGroup.PropertyNames.Name, strGroupName,

Troubles changing current browser in Coded UI Tests

扶醉桌前 提交于 2019-12-11 11:39:16
问题 I have coded some automated web tests in C#, they use the Coded UI Test Library. These tests are not a bunch of recorded actions, They have been coded and executed on IE. I am using Visual Studio 2010 and I'm trying to launch my tests on Firefox 3.6. I have already installed the required components for this purpose. The problem is that I want to choose the browser I want to use to test my applications, so I want to change the field "currentBrowser" but I cannot have access to this property