lundi 15 janvier 2018

LeanFT C# automation; Clicking on a wpf button control throwing exception

Getting HP.LFT.SDK.GeneralReplayException: One or more specified arguments are not valid, while trying to click on a wpf button(using LeanFT with C# integrated in Visual Studio 2015 )

Appreciate any help. Given the code below:

// Identify the "LicensingButton" button var LicensingButton = objAdminApplicationModel.wnd_Adminstration.Describe(new ButtonDescription { Text = @"Licensing", ObjectName = @"Licensing" }); // Click the Licensing button. LicensingButton.Click();

But I am getting below exception Exception is HP.LFT.SDK.GeneralReplayException: One or more specified arguments are not valid. at HP.LFT.SDK.Core.ClassModel.TestObjectExecuterBase.HandleReplayError(Int32 errorCode, IDictionary2 data) at HP.LFT.SDK.Core.Communication.CommunicationClient.HandleError(Action2 onError, Int32 status, IDictionary2 data) at HP.LFT.SDK.Core.Communication.CommunicationClient.Send(String messageType, IDictionary2 data, Action2 onError) at HP.LFT.SDK.Core.ClassModel.TestObjectExecuter.ExecuteMethod(String methodName, Object[] arguments) at HP.LFT.SDK.Core.ClassModel.TestObjectBase.ExecuteMethod(String methodName, Object[] arguments) at HP.LFT.SDK.ClickBehaviour.Click(MouseButton button) at HP.LFT.SDK.UiObjectBase.<>c__DisplayClassd.<Click>b__c() at HP.LFT.SDK.OperationExecutionWrapper.ExecuteWithEvents(ITestObject testObject, Object additionalInfo, Action innerAction, MethodBase methodInfo, Boolean reportOnlyOnError, Object[] arguments) at HP.LFT.SDK.OperationExecutionWrapper.ExecuteWithEvents[T1](Action innerAction, Action1 originalMethod, T1 param1, Boolean reportOnlyOnError, ITestObject testObject, Object additionalInfo) at HP.LFT.SDK.UiObjectBase.Click(MouseButton button) at Admin4DM.Test.Licensing.Licensing_VerifyStaticTextDisplay() in C:\Source\Automation\Test\Licensing.cs:line 32

Thanks, JG

Aucun commentaire:

Enregistrer un commentaire