Micro Focus QTP (UFT) Forums

Full Version: Problem with menu object (UFT)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I'm automating a web portal with UFT V11.50

I 'm having problems with a menu item. This problem is as follows:

if I click on the menu item manually and then launched the automated test case, uft recognizes the object and clicks on it. However, if I do click on the object manually and launched the automated test case, I recognize the object but does not click on it.
Anyone know what happens?

Thank you very much.
Check the Menu item hierarchy
Hi,

thanks for answering my question.

The code I use is as follows:

Code:
Public Function navInicio()    
    If navegador.WebElement("class:=menuButton","innertext:=Inicio").Exist(5) Then        
        navegador.WebElement("class:=menuButton","innertext:=Inicio").Click                
    else
        msgbox ("Inicio not found")    
    End If    
End Function


What is the aim of Check the Menu item hierarchy?

Thanks,
Am not really sure of the scenario you mention but UFT has an inherent problem of not being able to recognize windows/objects that were launched before launching UFT. So, are you launching the application manually before UFT itself? please let me know if otherwise
Hi,

I solved my problem as follow:

Code:
Browser(br).Page(pg).WebElement("innerhtml:=Inicio").FireEvent "onmouseover"
    Browser(br).Page(pg).WebElement("innerhtml:=Inicio").FireEvent "onclick"

Thank you.