There is no error. It's just that the Click action is not done. The border is just shaded black. Manually this is OK. However, when done through QTP, Click action is not properly performed. There seems no other action available for this operation
I agree with robbiewinston's observations. I used to face similar problems with my web application too. You can try using set focus on the button or a sync statement. Also ensure that smart identification is disabled in the run time settings.
Thanks for the tips but non of them works [img]/images/graemlins/frown.gif[/img]
1) Is this first event after the page has loaded? It may be that you have to wait for the page to sync?
>> No this is not the first event anymore.
>> There is only one button with the name. I tried highlighting the object in Object Repository, and it is correctly identified.
3) Do you have smart identification turned on? Turn it off and see if the script fails. If it fails because of duplicate objects, change the OR so that it identifies the button uniquely.
>> I tried turning off SI on the button and other buttons in the page but still fails.
This is my current script:
Browser("XXX").Page("XXX").Frame("ordercontrol").W ebButton("Add to Cart").FireEvent "onmouseover"
Browser("XXX").Page("XXX").Frame("ordercontrol").W ebButton("Add to Cart").Click