locked
How to test desktop application in coded ui for window for whicha have userId and password field and cancle button RRS feed

  • Question

  • I am new to coded UI and i dont have any basic idea about

    i want to test desktop application which has userid and password field and login button 

    Tuesday, May 1, 2018 9:30 AM

All replies

  • Some test are best done manually rather than automated, for testing a login a manual test would be the way to go.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Tuesday, May 1, 2018 9:41 AM
  • No but i want to perform automatic
    Tuesday, May 1, 2018 9:58 AM
  • No but i want to perform automatic

    Well, this is not a codeUI testing forum. This is the C# forum dealing with C# issues.

    Maybe, you should post to a testing forum.

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vsunittest

    Tuesday, May 1, 2018 10:21 AM
  • No but i want to perform automatic

    Well if you really want to put that much effort into this

    https://msdn.microsoft.com/en-us/library/dd286726.aspx?f=255&MSPPError=-2147217396


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Tuesday, May 1, 2018 10:34 AM
  • I want handcoding scrpit for this
    Tuesday, May 1, 2018 10:41 AM
  • I want handcoding scrpit for this

    I'm done here and the reason why is you don't listen to reason and secondly have no room for flexibility. If I didn't know better it's starting to sound like you are trying to hack a login dialog that is not even yours. There is no reason to hand write a script if this is your code, best practices would dictate using a automated script or manual script to write out a test plan that validates 

    • Successful login
    • Too many attempts
    • Lock out if too many attempts
    • Recover password
    • and more

    But I'm guessing you have not considered this or will come back with something like it does not matter to you.

    Any ways that all I have to give you, do manual testing.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites


    Tuesday, May 1, 2018 10:46 AM
  • I  agree with your reason mam but where i am working they want this i have tried my best in web application but i am not able to do in desktop

     public class CodedUITest1
        {
            public CodedUITest1()
            {
            }

            [TestMethod]
            public void ValidateLogin()
            {
                // To generate code for this test, select "Generate Code for Coded UI Test" from the shortcut menu and select one of the menu items.
                //username
                BrowserWindow browser = BrowserWindow.Launch("http://localhost/login/Login.aspx");
                UITestControl UIuser = new UITestControl(browser);
                UIuser.TechnologyName = "web";
                UIuser.SearchProperties.Add("ControlType", "Edit");
                UIuser.SearchProperties.Add("ID", "txtusername");
                Keyboard.SendKeys(UIuser, "tuli");



                //password
                UITestControl UIpassword = new UITestControl(browser);
                UIpassword.TechnologyName = "web";
                UIpassword.SearchProperties.Add("ControlType", "Edit");
                UIpassword.SearchProperties.Add("ID", "txtPassword");
                Keyboard.SendKeys(UIpassword, "tulip");
               

                //loginbutton
                UITestControl LoginBtn = new UITestControl(browser);
                LoginBtn.TechnologyName = "web";
                LoginBtn.SearchProperties.Add("ControlType", "Button");
                LoginBtn.SearchProperties.Add("ID", "LoginCmd");
                Mouse.Click(LoginBtn);

                Playback.Wait(1500);
            }

    But i am not getting anything for handcoding 

    above same code i want to convert in desktop pls help mam


    • Edited by tulsi_1 Tuesday, May 1, 2018 10:52 AM personal info
    Tuesday, May 1, 2018 10:52 AM
  • But i am not getting anything for handcoding 

    above same code i want to convert in desktop pls help mam

    Look man, this in not a CodedUI testing forum. You should post to the correct forum. The MSDN forum for CodedUI tests was closed long ago.

    https://social.msdn.microsoft.com/Forums/en-US/home?forum=vsautotest

    Stackoverflow is open.

    https://stackoverflow.com/questions/tagged/coded-ui-tests

    Tuesday, May 1, 2018 11:10 AM