Note that there are some explanatory texts on larger screens.

plurals
  1. POwhen i update UIMap in coded UI test , the UIMap.Designer.cs file overwrite on my code
    primarykey
    data
    text
    <p>when i record a test method for "Login Scenario" with Coded UI test , it generates code like this </p> <p><strong>Generated Code</strong></p> <pre><code> public void LoginMethod() { #region Variable Declarations WinEdit uIItemEdit = this.UIDiagnosoftVIRTUEWindow.UIItemWindow.UIItemEdit; WinEdit uIItemEdit1 = this.UIDiagnosoftVIRTUEWindow.UIItemWindow1.UIItemEdit; WinComboBox uIItemComboBox = this.UIDiagnosoftVIRTUEWindow.UIItemWindow2.UIItemComboBox; WinButton uIConnectButton = this.UIDiagnosoftVIRTUEWindow.UIConnectWindow.UIConnectButton; #endregion // Type 'username' in 'Unknown Name' text box uIItemEdit.Text = this.LoginMethodParams.UIItemEditText; // Type '********' in 'Unknown Name' text box Keyboard.SendKeys(uIItemEdit1, this.LoginMethodParams.UIItemEditSendKeys1, true); // Select 'facility' in 'Unknown Name' combo box uIItemComboBox.SelectedItem = this.LoginMethodParams.UIItemComboBoxSelectedItem; // Click 'Connect' button Mouse.Click(uIConnectButton, new Point(64, 14)); } </code></pre> <p>i update this code to allow Data Driven Source ,CSV file which contains username,password,.... here is the updated code</p> <p><strong>Updated Code</strong></p> <pre><code> public void LoginMethod(string username,string password,string facility) { #region Variable Declarations WinEdit uIItemEdit = this.UIDiagnosoftVIRTUEWindow.UIItemWindow.UIItemEdit; WinEdit uIItemEdit1 = this.UIDiagnosoftVIRTUEWindow.UIItemWindow1.UIItemEdit; WinComboBox uIItemComboBox = this.UIDiagnosoftVIRTUEWindow.UIItemWindow2.UIItemComboBox; WinButton uIConnectButton = this.UIDiagnosoftVIRTUEWindow.UIConnectWindow.UIConnectButton; #endregion // Type 'msameeh' in 'Unknown Name' text box uIItemEdit.Text = username; // Type '{Tab}' in 'Unknown Name' text box uIItemEdit.Text=password; // Select 'diagnosoft.com' in 'Unknown Name' combo box uIItemComboBox.SelectedItem = facility; // Click 'Connect' button Mouse.Click(uIConnectButton, new Point(64, 14)); } </code></pre> <p>and i run test method and it works well But when i edit the UIMap to add unused controls like "Canncel button" or any other controls like in this link </p> <p><a href="http://blogs.microsoft.co.il/blogs/shair/archive/2010/08/08/coded-ui-test-tip-4-add-unused-controls-to-ui-map.aspx" rel="nofollow">http://blogs.microsoft.co.il/blogs/shair/archive/2010/08/08/coded-ui-test-tip-4-add-unused-controls-to-ui-map.aspx</a> the UIMap.Designer.CS file overwrites my Login method <strong>Updated code</strong> with <strong>Genereated code</strong></p> <p>Thanks in Advance </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload