-
Notifications
You must be signed in to change notification settings - Fork 29
Upgrading from v1.0 to v2.0
-
Remove all references to the old CUITe assembly.
-
Reference Microsoft Coded UI controls using their full namespace to avoid conflict with the new CUITe controls namespaces.
For example, if a document hasusing Microsoft.VisualStudio.TestTools.UITesting.HtmlControls;
either:
A. Remove it and replaceHtmlButton
withMicrosoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlButton
.
or
B. Replace it with an alias (ex.using CUITControls = Microsoft.VisualStudio.TestTools.UITesting.HtmlControls;
) and replaceHtmlButton
withCUITControls.HtmlButton
. -
Add a reference to the new CUITe NuGet package appropriate to your version of Visual Studio and UI technology.
-
Remove all instances of
CUITe_
in the source code. -
Replace all instances of
.Get<
with.Find<
. -
Replace all search properties with their equivalent fluent syntax.
For example, replace the following:
Old | New | Alternate |
---|---|---|
"Name=MyControlName" |
By.Name("MyControlName") |
.AndName("MyControlName") |
"ControlId=1234" |
By.Id("1234") |
.AndId("1234") |
"Automationid=MyAutomationId" |
By.Automationid("MyAutomationId") |
.AndAutomationid("MyAutomationId") |
"ClassName=MyClassName" |
By.ClassName("MyClassName") |
.AndClassName("MyClassName") |
All other search properties can use the generic By.SearchProperties("OtherSearchProperty=Value")
or .AndSearchProperties("OtherSearchProperty=Value")
The new fluent syntax requires adding the using statement using CUITe.SearchConfigurations;
.
- Replace all controls referenced by their old type to the new type.
For example, replace the following:
Old | New |
---|---|
BrowserWindow |
BrowserWindowUnderTest |
SlButton |
SilverlightButton |
SlCalendar |
SilverlightCalendar |
SlCell |
SilverlightCell |
SlCheckBox |
SilverlightCheckBox |
SlComboBox |
SilverlightComboBox |
SlControl |
SilverlightControl |
SlDataPager |
SilverlightDataPager |
SlDatePicker |
SilverlightDatePicker |
SlEdit |
SilverlightEdit |
SlHyperlink |
SilverlightHyperlink |
SlImage |
SilverlightImage |
SlLabel |
SilverlightLabel |
SlList |
SilverlightList |
SlPassword |
SilverlightPassword |
SlRadioButton |
SilverlightRadioButton |
SlSlider |
SilverlightSlider |
SlSpinner |
SilverlightSpinner |
SlTab |
SilverlightTab |
SlTabItem |
SilverlightTabItem |
SlTable |
SilverlightTable |
SlText |
SilverlightText |
SlTree |
SilverlightTree |
- Replace deprecated methods with their equivalent property getters and setters.
For example, replace the following:
Old | New |
---|---|
.GetText() |
.Text |
.SetText("MyText") |
.Text = "MyText" |
.UnWrap() |
.SourceControl |
- If inheriting from SilverlightControl, change the constructor as follows:
Old | New |
---|---|
MyCustomControl(string searchParameters) |
MyCustomControl(By searchConfiguration) |