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

后端 未结 1 1188
傲寒
傲寒 2021-01-21 19:08

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 Admin00

相关标签:
1条回答
  • 2021-01-21 19:39

    to set the property just do:

    new UILoginInternetExploreWindow().UILoginDocument.UIUserNameorEmailAddreEdit.Text = 
    "Some Text";
    

    or:

    var loginControl = new UILoginInternetExploreWindow().UILoginDocument.UIUserNameorEmailAddreEdit;
    loginControl.Text = "Some Text";
    
    0 讨论(0)
提交回复
热议问题