Ask a Question

Element identified during recording is failed during execution with TC v 14.60

SOLVED
ckumar
Occasional Contributor

Element identified during recording is failed during execution with TC v 14.60

Hi ,

 

Im trying to execute desktop applications. But unfortunately the  object identified during recording is failed to identify during execution.

 

Its simple login form where in when user enters the username and password then the OK button should be enabled,

This works in manually and also during recording. But during execution the ok button is not enabled even after entering the username and password

 

Regards,

Ckumar

7 REPLIES 7
ckumar
Occasional Contributor

Hi ,

 

During the execution of automation tests im observing an issue for the desktop applications.  My Application works when all the buttons are properly clicked it opens a  dialog window. 

During the recording the element is identified and clickable and dialog window is opened. But during execution the test complete log says element is clicked but actually its not and dialog is not opened too,

 

 

Regards,

Ckumar

 

 

ckumar
Occasional Contributor

This is supposed to  Desktop application. By mistake its created under web. Not sure how can i move this topic under desktop

 

 

Regards,

Ckumar

hkim5
Staff

could you try swapping between setText and Keys operation when you are typing into the username and password box to see if the button gets enabled?

 

Best,
Justin Kim

im assuming that you have to first click the item which then opens up the secondary window that you need to click. could you try adding in a short delay between the two actions?

also, what is the error log (details) tab when the operation fails?

are the individual options in that dropdown identified as their own objects, or is it the whole dropdown window that gets highlighted? 

can you also post your test script?

is the click action on that secondary dropdown using any coordinates within its operation parameters?

 

Best,
Justin Kim
anupamchampati
Frequent Contributor

Try to use

Keys(Value + "[Tab]") - Tab will actually switch the focus on another tab.

 

ckumar
Occasional Contributor

Hi ,

 

Apologies for delayed reply.

 

Here is my script. Login form is open on a button click.I think you can understand from my script

 

def Test1():
    #Runs the "FirmwareTestTool" tested application.
    TestedApps.FirmwareTestTool.Run()
    #Selects the 'Test && Update' tab of the 'tabControl' tab control.
    Aliases.FirmwareTestTool.MainForm.tabControl.ClickTab("Test && Update")
    #Sets the state of the 'cbUpdateFirmware' check box to cbUnchecked.
    Aliases.FirmwareTestTool.MainForm.tabControl.programmerTabPage.wizardPanel.tableLayoutPanel1.tableLayoutColumnPanel.groupBoxActions.cbUpdateFirmware.wState = cbUnchecked
    #Sets the state of the 'cbUploadDefaultParameters' check box to cbUnchecked.
    Aliases.FirmwareTestTool.MainForm.tabControl.programmerTabPage.wizardPanel.tableLayoutPanel1.tableLayoutColumnPanel.groupBoxActions.cbUploadDefaultParameters.wState = cbUnchecked
    #Clicks the 'RoomCountApplicationRadioButton' button.
    Aliases.FirmwareTestTool.MainForm.tabControl.programmerTabPage.wizardPanel.tableLayoutPanel1.tableLayoutColumnPanel.selectDeviceTypeCtrl.deviceTypeGroupBox.RoomCountApplicationRadioButton.ClickButton()
    #Sets the state of the 'cbTestLens' check box to cbChecked.
    Aliases.FirmwareTestTool.MainForm.tabControl.programmerTabPage.wizardPanel.tableLayoutPanel1.tableLayoutColumnPanel.groupBoxActions.cbTestLens.wState = cbChecked
    #Clicks the 'continueButton' button.
    Aliases.FirmwareTestTool.MainForm.tabControl.programmerTabPage.navigationPanel.continueButton.ClickButton()
    #Enters the text 'adiUser' in the 'userIdTextBox' text editor.
    Aliases.FirmwareTestTool.UserAuthenticationDlg.userIdTextBox.SetText("adiUser")
    #Enters '[Tab]' in the 'userIdTextBox' object.
    Aliases.FirmwareTestTool.UserAuthenticationDlg.userIdTextBox.Keys(Value + "[Tab]") 
    #Enters text in the 'passwordTextBox' text editor.
    Aliases.FirmwareTestTool.UserAuthenticationDlg.passwordTextBox.SetText(Project.Variables.Password1)
    #Clicks the 'okButton' button.
    Aliases.FirmwareTestTool.UserAuthenticationDlg.okButton.ClickButton()
    #Clicks the 'btnClose' button.
    Aliases.FirmwareTestTool.SensorImageDisp.btnClose.ClickButton()
    #Check whether '*Completed*' matches the text optically recognized in the image Aliases.FirmwareTestTool.MainForm.tabControl.programmerTabPage.helpPanel.statusLabel.
    OCR.Recognize(Aliases.FirmwareTestTool.MainForm.tabControl.programmerTabPage.helpPanel.statusLabel).CheckText("*Completed*")
ckumar
Occasional Contributor

Hi ,

 

Did a small work around. After entering username and do tab and enter password. Here the ok button was  not enabled. So now i have added  Tab keyword twice. then the OK button enabled

 

Aliases.FirmwareTestTool.UserAuthenticationDlg.userIdTextBox.SetText("adiUser")
    #Enters '[Tab]' in the 'userIdTextBox' object.
    Aliases.FirmwareTestTool.UserAuthenticationDlg.userIdTextBox.Keys("[Tab]") 
Aliases.FirmwareTestTool.UserAuthenticationDlg.passwordTextBox.SetText(Project.Variables.Password1)


    Aliases.ADI_EagleEye_BoardandFirmwareTestTool.UserAuthenticationDlg.userIdTextBox.Keys("[Tab]")
    #Enters '[Tab]' in the 'userIdTextBox' object.
    Aliases.ADI_EagleEye_BoardandFirmwareTestTool.UserAuthenticationDlg.userIdTextBox.Keys("[Tab]")
    
    #Clicks the 'okButton' button.
    Aliases.ADI_EagleEye_BoardandFirmwareTestTool.UserAuthenticationDlg.okButton.ClickButton()

 

cancel
Showing results for 
Search instead for 
Did you mean: