coded-ui-tests

Execute Coded UI Tests in multiple environments

◇◆丶佛笑我妖孽 提交于 2019-12-09 03:27:42
问题 Right now my Coded UI Tests use their app.config to determine the domain they execute in, which has a 1-1 relationship with environment. To simplify it: www.test.com www.UAT.com www.prod.com and in App.config I have something like: <configuration> <appSettings> <add key="EnvironmentURLMod" value ="test"/> and to run the test in a different environment, I manually change the value between runs. For instance the I open the browser like this: browserWindow.NavigateToUrl(new Uri("http://www." +

How to get the page source from an IE window?

霸气de小男生 提交于 2019-12-08 14:01:53
问题 I need to parse the page source as rendered by IE. I can use the following simple code to open an IE to a URL. (The BrowserWinodw type is from the Visual Studio Coded UI test framework.) BrowserWindow bw = BrowserWindow.Launch(url); How to get the page source from the IE window? Thanks! 回答1: I have figured out a way to do it. Use the IHtmlDocument2 interface. With reference to this article: http://support.microsoft.com/kb/292485 I will share my code snippet shortly. 来源: https://stackoverflow

Automated application testing with TFS

青春壹個敷衍的年華 提交于 2019-12-08 12:21:12
问题 I think I'm missing a link somewhere in how microsoft expect TFS and automated testing to work together. TFS allows us to create test cases that have test steps. These can be merged into a variety of test plans. I have this all setup and working as I would expect for manual testing. I've now moved into automating some of these tests. I have created a new visual studio project, which relates to my test plan. I have created a test class that relates to the test case and planned to create a test

Does Coded UI Code First API support drag and drop?

一个人想着一个人 提交于 2019-12-08 11:58:16
问题 I have used Selenium Webdriver in the past for automating my Web UI tests but recently I have to write tests for Sharepoint. I got quite far using Selenium but got stuck at a point where I have to perform Drag and Drop. It seems that in my particular case I can't get drag and drop to work with that site. Now I want to look and other options and CodedUI seems to be the next best option to me. I do not want to record the tests, instead I use the Page object model therefore I want to use Coded

CodedUI Test: Keyboard.SendKeys not working

…衆ロ難τιáo~ 提交于 2019-12-08 08:16:30
问题 I'm trying to use the CodedUI Test feature of Visual Studio 2010. I've got a problem while replaying the various actions for one of my html component. The Keyboard.SendKeys generated do not work (like if there was no input). The code generated is : // Type '{F4}{F4}{F2}titre{Enter}' in 'SaisieSD_DS' custom control Keyboard.SendKeys(uISaisieSD_DSCustom, this.Params.UISaisieSD_DSCustomSendKeys, ModifierKeys.None); If I replace the call to Keyboard.SendKeys by a call to System.Windows.Forms

System.WIndows.Forms.Ribbon controls in CodedUI

不羁岁月 提交于 2019-12-08 07:52:13
问题 I am developing C# winform application. I have Ribbon in my form which contains several tabs and several ribbonbuttons. I am using Coded UI for testing. The problem i am facing is i am unable to find the ribbonbuttons using coded ui, whenever i hover on any control of ribbon (say ribbonbutton), it detects only ribbon but not that control. Can any one suggest whether ribbon controls supports Coded UI for testing? If yes, then how can i do so? 回答1: There is another ribbonbar inside the

When would you use the UITestControl.Find method?

核能气质少年 提交于 2019-12-08 07:50:49
问题 When checking whether a page/screen has loaded, I often use the UITestControl.WaitForControlExist() method, but I am finding example code that follows the ctl.WaitForControlExist() with otherCtl.Find() calls on the parent controls. Like this: var tab = UIMainMenuExtWindow.UIItemWindow.UIRibbonClient.UISolutionsTabPage; tab.WaitForControlExist(3000); UIMainMenuExtWindow.Find(); UIMainMenuExtWindow.UIItemWindow.Find(); UIMainMenuExtWindow.UIItemWindow.UIRibbonClient.Find(); UIMainMenuExtWindow

VS2012 failed to keep consistent DLL version in *.csproj file and assembly manifest, a VS2012 bug?

。_饼干妹妹 提交于 2019-12-08 07:39:00
问题 I am using Visual Studio 2012 RTM on a Win8 box. My VS2012 installs on D: partition. I am writing a CodedUI test project. This project was originally written with VS2010 and I upgraded it with VS2012. I referernce the CodedUITestFramework dll of version 11.0 in the project. And in the *.csproj file, it says <Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> The project

CodedUI object creation based on UITestControl

半世苍凉 提交于 2019-12-08 06:37:56
问题 My question is a continuation on the following CodedUI not recognizing HtmlControl when searched within scope of UITestControl instead of BrowserWindow question. I'm experiencing the same problem and I would like to know why this is happening. Here are my findings. BrowserWindow inherits from ApplicationUnderTest, which on his own inherits on ApplicationBase, which again inherits from UITestControl. All the controls as HtmlRow do contain a constructor requesting as a parameter UITestControl.

How to run Coded UI test file from Visual Studio command prompt using batch file?

限于喜欢 提交于 2019-12-08 02:43:15
问题 @echo off @setlocal enableextensions @cd /d "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE" start %comspec% /k ""C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"" MSTest /testcontainer:C:\testdir\test.dll Code shown above runs vs command prompt and changes directory to "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE" where MSTest.exe is. But last line doesn't run in vs command prompt window, opens new window and tries to run in a new opened window. Can