Vote count:
0
I worte following code to verify localization string in UI
[TestMethod]
public void Not_mobile_number_message()
{
var _resourcesLoader = new ResourceLoader();
var expectedStr = _resourcesLoader.GetString("NumberRegistrationNotMobileNumberMessage");
XamlWindow AppWindow = XamlWindow.Launch(appIdentifier);
Gesture.Tap(this.UIMap.UIdebugWindow.PhoneNumberEditor);
this.UIMap.UIdebugWindow.PhoneNumberEditor.Text = phoneNumber;
this.UIMap.UITruecallerdebugWindow.CountryList.WaitForControlPropertyNotEqual("Text", "");
Gesture.Tap(UIMap.UIItemWindow.AppBarMenu);
Gesture.Tap(UIMap.UIItemWindow.VerifyAppBarButton);
//Verify message box pop out and text "Number is not a mobile number" is shown
Assert.AreEqual(expectedStr, UIMap.UIItemWindow.ErrorMessageBoxPan.ErrorMessageBoxText.Name);
}
Once the code executed then error message showed next to the var _resourcesLoader = new ResourceLoader(); with message "An exception of type 'System.AccessViolationException' occurred in Truecaller.WindowsPhone.CodedUITests.DLL but was not handled in user code"
Any ideas how to solve this issue?
asked 1 min ago
How to read string value from a resw file in Coded UI
Aucun commentaire:
Enregistrer un commentaire