coded-ui-tests

Run Coded UI test from console application

冷暖自知 提交于 2019-12-02 09:44:05
问题 I'm fighting running a coded ui test from a console application. I did the following (As the internet says) Solution with 2 Projects: ColorChanger.app / ColorChanger.test the console application has a reference to the test project and to Microsoft.VisualStudio.TestTools.UITesting I would like to call the test like this: static void Main(string[] args) { Playback.Initialize(); var test = new CodedUITest1(); test.change(); Playback.Cleanup(); } I get the error "System.IO.FileNotFoundException

Coded UI test takes 2-3 minutes to pass

可紊 提交于 2019-12-02 09:09:54
So I am working with Coded UI to run some automated tests and one of the tests takes an extremely long time to complete. I used breakpoints and found that after End Get in the bottom block of code, nothing happens for minutes and then finally the Assert.AreEqual completes and the test passes. I tried changing a few playback settings but nothing changed. Does anyone know what is going on, and how I can fix it? -The first block of code is a generated Assert method that gets called by the test -The second block of code is called in the Assert parameters '''<summary> '''assert_clicked_columnhead

CodedUI How to pass values to a treeItem

非 Y 不嫁゛ 提交于 2019-12-02 09:01:55
In my winform application, there's a BrowseForFolder window. While recording a test method, I selected say C:\Folder1\MyData . However this path can be different and I am writing a method which takes the driveLetter, foldername and filename as parameters. These values should be the ones selected in the browserwindow. When I looked at the UIMap, there are treeitems. For instance, for drive name, its UILocalDiskCTreeItem . Search properties has the following: ControlType: TreeItem Name: Local Disk (C:) Value 2 (denotes the depth) I tried setting the Name/Friendly Name property of this tree item

Is it possible to run CodedUI test without installing VS? How?

放肆的年华 提交于 2019-12-02 08:52:21
问题 I want to run my coded UI test on a testing machine, but I wish If I can escape from installing VS2012 on my Test machine. Is there any any way to do it? 回答1: According to this blog you only need to install the test controller software on a machine: http://blogs.microsoft.co.il/shair/2015/04/08/automation-runner-running-tests-without-visual-studio/ Also there is a tool that wraps around VSTEST.Console to simplify running tests without VS: Automation Runner only Requires Test Controller to be

How do I implement AssemblyInitialize/AssemblyCleanup in my CodedUITest in MSVS 2010?

倖福魔咒の 提交于 2019-12-02 08:36:10
I am trying to implement AssemblyInitialize/AssemblyCleanup attributes in my Microsoft Visual Studio 2010 for the exact purpose as stated here . That link even describes the process which I need to follow to implement the code. A quick summary of that purpose is to create an initial block of code which will run right before any test no matter which of the codedUITests I run in the solution and then a block of code which will run after the last codedUITest is completed. Example: I need to open up a specific application, then run a series of codedUITests which all start at that application and

Could not load file or assembly 'WebDriver, Version=2.35.0.0 …'

此生再无相见时 提交于 2019-12-02 06:22:10
I followed steps of " Selenium components for Coded UI Cross Browser Testing ". But I had download the lastest version of: WebDriver.ChromeDriver.win32 2.4.0 http://www.nuget.org/packages/WebDriver.ChromeDriver.win32/ selenium-dotnet-strongnamed-2.37.0 https://code.google.com/p/selenium/downloads/list then I installed those in my machine of 64bits but the Visual Studio 2013 present the next problem when I try to run automated test: System.IO.FileNotFoundException: Could not load file or assembly 'WebDriver, Version=2.35.0.0, Culture=neutral, PublicKeyToken=1c2bd1631853048f' or one of its

CodedUI dropdown selection

大兔子大兔子 提交于 2019-12-02 05:31:41
I am trying to hand code my g mail signup form , i want to select month from drop down , but i was able to click the drop arrow by searching the properties from Test Builder.and not possible to find the property from month content , tried with Test Builder . can any one show me how to select that particular drop down Thank you , I would suggest you let Coded UI show you what to do. Try creating a (sandbox) Coded UI project and use the Coded UI record and generate tool to perform the required actions. Then copy the ideas from the automatically generated code. If the Coded UI recorder cannot

How to I inject programmatic text into my Coded UI test (as opposed to recorded text) in Visual Studio?

风流意气都作罢 提交于 2019-12-02 04:46:35
问题 The recorder works fine for quickly getting some steps thrown down, but I need to be able to store and set arbitrary text. Let's say I generated a new admin user called Admin001. I want to be able to set the text for the control to be "Admin001", not whatever was recorded when I first used the builder. I know you can do data bindings to CSV and the like, but that's too burdensome. I want to be able to write C# code to change which text is typed. Screenshot: Code attempt: var loginElement =

Run Coded UI test from console application

…衆ロ難τιáo~ 提交于 2019-12-02 04:07:53
I'm fighting running a coded ui test from a console application. I did the following (As the internet says) Solution with 2 Projects: ColorChanger.app / ColorChanger.test the console application has a reference to the test project and to Microsoft.VisualStudio.TestTools.UITesting I would like to call the test like this: static void Main(string[] args) { Playback.Initialize(); var test = new CodedUITest1(); test.change(); Playback.Cleanup(); } I get the error "System.IO.FileNotFoundException Die Datei oder Assembly \"Microsoft.VisualStudio.TestTools.UITest.Framework, Version=12.0.0.0, Culture

Coded UI Control.Exists. System.NullReferenceException

亡梦爱人 提交于 2019-12-02 04:06:35
I want to check that window exists after some actions. I try: protected override Boolean IsPresent() { if (_mainWindow == null) { _mainWindow = new WinWindow(); _mainWindow.SearchProperties[WinWindow.PropertyNames.ControlName] = "MainWindow"; } return _mainWindow.Exists; } But if control does not exist mainWindow.Exists throws System.NullReferenceException. I can't understand why it happens because mainWindow reference in this code can't be null. How can I verify is _mainWindow founded or not? I've did it to wait for window loading with timeout. I've also tried to use MainWindow.FindMainWindow