
Topics
- Introduction to Visual Studio Testing
- An Introduction to Coded UI Test(CUIT)
- Coded UI Record and Playback
- Understanding Coded UI Recorded Code from UIMap
- Working with Assertions in Coded UI Test Builder
- Data Driven Testing in Coded UI Test Record and Playback
- Get and Set Properties in Coded UI Testing
- Hand Coding in Coded UI Testing – Part 1
- Hand coding in Coded UI testing – Part 2
- Hand Coding Coded UI Test with UITestControl
- Getting all the Controls properties from Application in Coded UI Test
- Record and playback in Coded UI for Web Applications
- Hand Coding Web Application using Coded UI Test
- Understanding Why and How Parent-Child relationship works in Coded UI Testing
- Creating custom reusable methods for different controls in Coded UI Testing
- Creating generic method for control with Generic in Coded UI
- Exploring features of Browser in CUIT
- Assertions in Coded UI Testing
- Exception handing in Coded UI Testing
- Types of Test Attribute in CUIT
- Run test in order via Ordered Test
- Using TestContext to identify the state of Test method
- Wait For Control in Coded UI Testing
- Cross Browser Testing with Coded UI
- DDT with Excel in CUIT with Custom Library (Part 1)
- DDT with Excel in CUIT with Custom Library (Part 2)
- Executing Javascript on Browser with Coded UI
I have one main frame application and coded-ui test builder does identify the objects. Can you please suggest me any other way to automate mainframe application using coded ui.
you can Automate the Mainframe with Excel Macro Automation. Based on the Emulator.
Its really nice blog.thank you for sharing this useful blog.
hi welcome to this blog.its really informative blog.thank you for sharing this useful blog.
I am working on to enter a text in a text box with in the pane by using coded UI , I recorded the action but when I play back the results are different on each run , first run it is selecting first text box and in second run selecting second text box.
Tag name is Div
Control type is pane
Searching based on Tag instance:
When debug the individual test working fine , but testing whole application having problem.
Hi,
I have a web application which has a number of Html Custom menu items (capable of being recognized by coded ui) but has a number of submenus too some of which are HtmlCustom controls and some as HtmlHyperlink controls. These sub menu items are hidden . My aim is to hover over the menu items (i.e html custom control)and then when they get expanded to click on the sub menu items which act as hyperlink. I am not able to do this. i use this code for clicking all the hyperlink .help me out how to handle with the HtmlCustom and then click items below it.
BrowserWindow browser = BrowserWindow.Launch(“http://www.ubtiinc.com/”);
browser.Maximized = true;
HtmlControl control = new HtmlControl(browser);
control.SearchProperties.Add(HtmlControl.PropertyNames.ClassName, “HtmlCustom”);
UITestControlCollection controlcollection = control.FindMatchingControls();
List names = new List();
foreach (HtmlControl x in controlcollection)
{
if (x is HtmlCustom)
{
HtmlCustom s = (HtmlCustom)x;
names.Add(s.Id);
Console.WriteLine(s.Id);
Mouse.Click(s);
}
}
Hi Karthik,
I am following your Coded UI Test series. It is awesome. I have learned so many things mainly hand coding part and exception handling.
I have situation where i have deal with dialog box/javascript popups. Can you please tell me how to deal generically these things.
Thank you….
Can we run Coded UI Test cases by using Selenium Grid??
Nope, they both are different and cannot use same API
Hi ,
i am working with coded ui testing in web application, in that i have to hover menu and click the sub menu under that , so i declared hover function on menu and then click function on sub menu.I am facing with some error as given below:
“Another control is blocking the control.Please make the blocked control visible and retry the action”
can any one please help me out to solve this issue.
Regards,
suruthi
This means the control has to be identified even more clearly, seems like it has more parents hierarchy.
Thanks
I was trying the same calculator example(tutorial 4) and win10 & visual studio 2015 . I am facing a problem that when I started the recording and clicked calculator buttons the recorder says “To test Windows Store apps, use the Coded UI Test project template for Windows Store apps under the Windows Store node.”
I tried to search for the templates but didn’t find it. please reply ASAP.
Windows 10 uses different technology, its not WinControl, its UWA (Universal Windows App).
Hence use the the calculator which is of WinControl or use some other application which is of type WinControl.
But still UWA is supported in Coded UI as well.
Thanks,
I am working on automating Inspect tool(Manual testing tool for Accessibility) using coded UI test tools.Can I get some details how to do .
Hello Karthik, i have come across one requirement in our project. we were asked to automate mainframe using coded UI. I have seen your videos in which i have found any information related to same. Can you please let me know the possibilities of Mainframe automation using CodedUI. If yes, can you please let me know process to do same.
Please find the below comments and ignore previous 🙂
Hello Karthik, i have come across one requirement in our project. we were asked to automate mainframe using coded UI. I have seen your videos in which i haven’t found any information related to same. Can you please let me know the possibilities of Mainframe automation using CodedUI. If yes, can you please let me know process to do same.
Sorry Prakash, no Idea on that, never worked with Coded UI for Mainframe application.
Thanks,
Hi Karthik,
I am following your video blog on CodedUI. Very good starting point.
For the Data Driven Testing video, if we change the TXT File properties to UTF-8 WITHOUT SIGNATURE, the issue you faced in the video will not occur.
Moving on to the Hand coded project, I understood what you are doing, but i am having a hard time using it on my test application.
It is a WPF application and I am missing a link after I click on a sign in button.
This is when a different screen loads.
When I spy on the button that I need to click, it has about 4-5 levels above it. Should I be creating classes/UITestcontrol objects for each of the items??
Also, in your hand coding tutorial, application launch code is missing, I am having a hard time figuring out where to keep that code. In [TestInitialize] attribute? if so, in which place ? CustomCaller.cs?? before the TestMethod/Datasource attributes??
Hi Karthik,
By comparing between record and handcoded projects, I found the following
UITestControl myApp= new WpfWindow();
myApp.SearchProperties[WpfWindow.PropertyNames.Name] = “XYZ”;
//Line from recorded script and the working one!
myApp.SearchProperties.Add(new PropertyExpression(WpfWindow.PropertyNames.ClassName, “HwndWrapper”, PropertyExpressionOperator.Contains));
//Line from what I wrote
myApp.SearchProperties[WpfWindow.PropertyNames.ClassName] = “HwndWrapper”;
Could you please let me know what is the difference? Why Add ? Why new PropertyExpression?
I am facing problem while finding the child element of control which is Winclient type.
There are some clickable tab inside this control for which i am not getting type of that control or name to search
I try to take getchildren of this control but in row it is giving blank.
UITestControlCollection tt= this.UIMap.UIWorkClaimsWindow.UIShacunMarshWindow.UIDockTabControl_6Window.UIDockTabControl_6Client.GetChildren();
foreach(WinClient ss in tt)
{
string mm = ss.Name;
}
PLease suggest how to handle this control
Need resolve this issue.
I am facing problem while finding the child element of control which is Winclient type.
There are some clickable tab inside this control for which i am not getting type of that control or name to search
I try to take getchildren of this control but in roe it is giving blank.
UITestControlCollection tt= this.UIMap.UIWorkClaimsWindow.UIShacunMarshWindow.UIDockTabControl_6Window.UIDockTabControl_6Client.GetChildren();
foreach(WinClient ss in tt)
{
string mm = ss.Name;
}
PLease suggest how to handle this control
Need resolve this issue.
HI Vikram,
GetChildren() method will not work for all the controls, rather you can use FindMatchingControl method, which will return you all the controls within that control via Enumerated values.
Here is an example post http://executeautomation.com/blog/getting-all-the-controls-properties-from-application-in-coded-ui-test/
Thanks,
Karthik KK
Hi Karthik,
Thanks for response.
I did the same as you suggest ..But this doesn’t solve my issue.
While debuging, we don’t get any values to enumerate.
Again I would like describe you scenario,UImap showing it is the control type Cleint,
and in GUI its like bar at bottom of application containing 3 clickable tab say A,B,C.
When click on A,it open a grid table,when click on B it open other grid table and so on..
Though test builder ,we cannot able to catch the UImap of any clickable tab A,B or C means when we take the cross hair on A ,testbuilder highlight the complete bar.
So in UImap there is no OR for A,B or C.
However I had a discussion with Dev team and found that this is a SyncFusion controls. Which is a third party control .
Could you please suggest further how to handle this in Coded ui.
Is there any way to send snap shot that i can describe it properly,
Regards,
Vikram
Sir,
What is the difference between videos here and the Udemy course.
Can I get some discount if I want to buy Udemy course videos for Coded ui 2015
Thank you sir.
Hello Kathik,
Need your help Please !!!
Currently i have field Signature Field where user has to make signature, since it mandatory .. how can i handle it.
its getting identified as HTML Custom Control, please suggest.
Regards
Jaya
You can still automate custom control if its recognized with unique identifiers in Coded UI test.
Thanks,
Karthik KK
Hi Karthik,
Am working web application automation with coded UI handcoding. They used kendo UI. Coded ui entering the text box values are very slow.
Is there any option to improve the speed of enter the text in the text box. I tried keyboard.sendKeys and .Text method.
Thanks,
Bala
Instead of Keyboard.Sendkey(), you can sometimes directly set the value to the control
E.g
CustomTextbox.Text = "ExecuteAutomation"
Thanks
Hi Karthk,
Thank u for videos.
I would like to generate custom reports for coded ui test at each step level and at testcase level, is there a way to create lie this. and also it should show kind of piecharts.
Example:
I have test case with 10 steps, when I execute report should show results for each step and overall testcase level result.
Kindly help me on this
Hi Karthik,
can you provide few lines of code for selecting date from DateTimePicker control using Mouse.Click()
Hi Karthik,
I am started automating windows application (MSAA technology). it is taking more time to identify the controls. is there any way to optimize it
Hi Suganya,
Did you get the solution for this?
I am also encountering the same probs and it seems no one has answer in this?
Please help me in this
Hi Karthik,
Thanks for the videos.
Can u share the framework you have to work and understand CodedUI better .
I have QTP Automation Background and i am new to CodedUI.
If you can provide the framework I will understand on my own to the best.
Please consider this as my humble request and send the framework in zipfile/any format to the mail id mentioned .. It would be really helpful for me.
I need to create the framework for WPF application . I hope that you will help me.
Even if you have the framework for HTML application send it to me. I will try to understand and change according to WPF .
Hi Karthik,
i am new to this coded ui and i had few questions,
1. couldn’t click on a button while automating but able to click on button manually even after defining the parent child objects, i am able to highlight the button which i need to click, could you please let me know what might be the issue.
2. a page contains 5 textboxes and there is no properties provided for all and i need to enter text into 5th textbox how do i proceed.
Hi Karthik,
Appreciate your blog, really helpful.
I am working on winform application, I can automate most of the components using coded UI. However there is an obstacle on my application. There is a Datagrid which is design with the help of Third party client[Syncfusion]. When I am try to locate data-grid cell value control using coded UI test builder I can find only the entire data-grid controls, because it’s custom client. I have googled and find some link to integrate Syncfusion with coded UI but I constantly failed. Here the blog link: https://help.syncfusion.com/windowsforms/grid/coded-ui-automation. If you come across with similar issue can you kindly share your Knowledge experience, perhaps it helpful if you could you do this.
Simple Example to understand my problem is: Open excel and try to find cell value control using coded UI [Similar issue ].
I tried to locate with Inspect.exe , UIspy and coded UI nothing works on case.
Awaiting for your reply and thanks in Advance
Hi Karthik,
I am working to automate window application.
I am facing problem to handle the datatime picker calendar as through test builder not able to get the property of calender.
Please help to handle it pick the desire date from calendar.
Regards,
Vikram
Can we automate windows application which is developed in visual basic using coded UI? I have tried to record the application but it’s not able to identify the controls. Is there any specific plugins are needed to automate this?
Application developed with VB should work without any problem with Coded UI, but see if there is any 3rd party plugins being used with the application such as Telerik controls, if so, you need to add those DLLs for your test project.
Thanks,
Karthik KK
Guys ,
Please help me out out to enter value/Text at edit box(Username/Password fields) and how select date in codedUI during Windows phone app Automating….
Hi Karthik,
What is the difference between this course and the udemy course, as per my job requirement I need to automate windows application using Coded UI.
Do your udemy course purely focus on automating WIN applications, if so I would like to purchase it. Please let me know.
Thanks,
Chinta
Hi Chinta,
Yes, the course (https://www.udemy.com/framework-development-with-cuit/) in Udemy is purely based on Windows as well as Web application automation by writing the code as framework.
Please use coupon code UD40 for discount while purchasing the course.
Thanks,
Karthik KK
VSTS Functional Tool is recognise the Siebel appliciton or not..?
I think it will.
Hi Karthik,
Recently I joined in new company, before joining me there were about 60 Coded UI scripts and I tried to run those, but unfortunately none of scripts are working, I am Selenium back ground and some how new to Coded UI, so need your help to sorted out.
Please share your contact number to connect with you directly, and I value your time so ready top pay for your services.
Looking forward and wait for your reply to my email please.
Hi Karthik,
I am struggling to click on browser window dialog OK button. highlevel steps are:
click on button–> it will popup a small Dialog box with Ok and cancel buttons.
I have to click on OK button, How do I clik on OK button? I have created Enum for BrowserDialogAction.
public enum BrowserDialogAction
{
Ok,
Cancel
}
I need to create a method which will click on OK b utton. Can you please help me. I am fairly new to CodedUI.
Thank You
I have been through many of your tutorials and the tutorials have been great. Tutorials on Visual Studio Web Performance & Load Testing would be appreciated.
VS2013 (ultimate )Error :: The following is not a valid technology name: MSAA. To search for a control, you must specify a valid technology name.
I am Trying to run the Project with SpecFlow +Coded UI
Test method running successfully with coded UI but, when call through Specflow definition i am facing a problem
please help me to resolve the issue
UITestControl uIHandlerOptions = new WinTreeItem(uIHandlerOptionsTreeItem);
Mouse.Click(new Point(uIHandlerOptions.BoundingRectangle.Location.X + uIHandlerOptions.BoundingRectangle.Width / 2, uIHandlerOptions.BoundingRectangle.Location.Y + uIHandlerOptions.BoundingRectangle.Height / 2));
Hi,
I am working on CodedUI Automation, in the coded ui script, when i use FindMatchControl to find controls in my application, it is throwing a script error popup like ” Unable to get property ‘bind’ of undefiend or null reference”.
can u please help me.
HI Karthik,
I am trying to connect to TFS 2013 using c#, when i am getting the project name from tfs, iam getting unable to load WITdatastore32.dll . Googled for long time and not getting any answers. Can you please help to resolve the issue?
Env: VS 2017 , TFS 2013 v12
Thanks,Vedha
am facing issues on Visual Studio Enterprise 2017 (Windows 10) while testing the calculator application. I have selected the “Coded UI Project” under Test, but while accessing the steps in the recorder it is showing a message “To test Windows Store apps, use the Coded UI Test project template for Windows Store apps under the Windows Store node”. So what I understood is Calculator application is considered as store app rather than a desktop app in Windows 10. But I am not able to solve the problem.
Hi Guys,
Thiz is Divya….i need crispy report for xamarin coded ui automation for both ios and android ..please suggest any report and then provide procedure for that report.
Thanks,
divya
Hi Kartik,
I’m new to C#, Shorthands for using lamba expressions etc..
I needed help is finding all the WpfRadiobutton children of an WpfCustom parent and then do two things:
a. Verify if it is Selected
b. To be able to Click any one of them based on Name Property
Note: The WpfCustom control is added to UIMap
I
I am enjoying your videos on Coded UI, but I am using VS 2017 Enterprise on Windows 10. I am trying to record the calculator and get the error “To test Windows Store apps, use the Coded UI Test project template for Windows Store apps under the Windows Store node”.
I have tried every Coded UI template with no success.
Any suggestions?
Thanks