Coded UI is new and popular automation testing tool in the software market developed by Microsoft which supports C# and VisualBasic.NET and it supports Internet Explorer browser. It also supports for objects and supports almost all of the applications so, you can test many different kinds of user interfaces not just the web and we can also integration it to with ALM. Coded UI requires team foundation server (TFS). You can record your test steps, calling the test steps in a single function call. Coded UI has an IntelliSense code completion feature which reliefs in generating code faster. If you have good knowledge of object oriented programming language so, I will recommend coded UI.
So, let’s create a login script with hand coding using Coded UI tool.
- Open the visual studio then go to file>New>Project and then hit on project. After hit on project a new window will appear.
- Now, fill the project name which you want and then hit on OK button. After hit on OK a new project with given project name will be create.
- Now, you can write the test code in method. If you want to assert any control so, you can use Coded UI Test Builder to assert any control for web or any other application. It’s open when you click on “Use Coded UI Test Builder” under Generate code for Coded UI Test.
4.Below all the screenshots, I asserted controls using Coded UI Test Builder and it is showing all the properties of controls. Now, you can use control properties to write your own code.
5. Finally, I written the test code using assert properties for login page.
You can also watch video on YouTube for this process.