Re: UFT Crash when using elseif together with insightObject (474 Views)
Reply
Advisor
Ivan Trampedach
Posts: 34
Registered: ‎12-20-2007
Message 1 of 4 (515 Views)

UFT Crash when using elseif together with insightObject

[ Edited ]

I have a script where my UFT crash after I have added the following lines

  

if Browser("xx").InsightObject("Bob1").Exist then 
    Browser("xx").InsightObject("Bob1").Click
Elseif  Browser("xx").InsightObject("Bob2").exist then      
    Browser("xx").InsightObject("Bob2").click
End if

 

It is not crashing in the statement but in same place a couple of lines after.

If I change the check to this, and by magic it is now running to the end

 

  if Browser("xx").InsightObject("Bob1").Exist then 
    Browser("xx").InsightObject("Bob1").Click
Else
    Browser("xx").InsightObject("Bob2").click
End if

 

I have tried the code in UFT version 11.52 and 11.53 with same ressults.


Regards
Ivan S Trampedach
Using UFT 11.52 and ALM 11.0
HP Expert
vzamoraz
Posts: 502
Registered: ‎04-12-2012
Message 2 of 4 (484 Views)

Re: UFT Crash when using elseif together with insightObject

I tried same structure and it works properly.

Did you install UFT with Full administrator rights user?

I recommend you to perform a repair of UFT with full admin rights.

 

1. Close UFT
2. Open Windows Registry Editor (Go to the Start menu, select “Run”, type “regedit” and click “Ok”)
3. Navigate to HKEY_CURRENT_USER\Software\Mercury Interactive
4. Right click on “QuickTest Professional” folder, select “Export” and save the file prompted
5. Right click on “QuickTest Professional” folder and select “Delete”
6. Navigate to HKEY_LOCAL_MACHINE\Software\Mercury Interactive
7. Right click on “QuickTest Professional” folder, select “Export” and save the file prompted
8. Right click on “QuickTest Professional” folder and select “Delete”
9. Browse to profile’s application data (Go to the Start menu, select “Run”, type “%appdata%\HP” and click “Ok”) and rename folder called “QuickTest Professional” to “QuickTest Professional.BAK”
10. Go to Control Panel -> Add/Remove Programs -> QTP -> Repair.
if you cannot see it
Launch QTP's Setup.exe like if you want to install it again.
Select the option install UFT
On the installation wizard you will see the option Repair.
Check it and continue with the wizard
Finish the repair process and launch QTP again

 

 

Note: Remember if you have a valid contract with HP feel free to visit our FT/QTP Support Customer Forums: http://h30499.www3.hp.com/t5/Functional-Testing-QTP/ct-p/sws-Fun_Test 

You can create an account with your HP credentials

 

The Opinions expressed in my post are mine alone, and do not reflect the opinions of my employer. No warranties express or implied for any answered posted.

Advisor
Ivan Trampedach
Posts: 34
Registered: ‎12-20-2007
Message 3 of 4 (474 Views)

Re: UFT Crash when using elseif together with insightObject

I am administrator on my computer, but I try as you suggest - run a repair.

 

I will update in a few days.


Regards
Ivan S Trampedach
Using UFT 11.52 and ALM 11.0
HP Expert
_Evelina_
Posts: 183
Registered: ‎01-17-2012
Message 4 of 4 (468 Views)

Re: UFT Crash when using elseif together with insightObject

Dear Ivan Trampedach,

 

In addition could you please let us know if you have had QTP installed earlier on that machine. This might affect the current installation and behavior of UFT is any traces are left from the previous version.

 

Thank you and Regards,

Evelina

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.