Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VB script in QTP script
#1
Solved: 10 Years, 9 Months ago
Hi,
I have a requirement in my QTP script
if the save button is enabled it should save else ignore and continue to the next step. How can I capture that in my script. here is the message iam getting when executing the script and the save button is disabled.

Object is disabled
Code:
JavaWindow("Client Information System").JavaButton("Vbutton").click

I want to handle this message programatically. Now iam clicking on skip button to skip and continue.

Thanks very much in advance.

Regards
Reply
#2
Solved: 10 Years, 9 Months ago
Hello,

Try this:

Code:
var=JavaWindow("Client Information System").JavaButton("Vbutton").GetROProperty ("visible")
if var="true" Then
  JavaWindow("Client Information System").JavaButton("Vbutton").click
end if

or Try:

Code:
var=JavaWindow("Client Information System").JavaButton("Vbutton").GetROProperty ("enable")
if var="true" Then
  JavaWindow("Client Information System").JavaButton("Vbutton").click
end if
Reply
#3
Solved: 10 Years, 9 Months ago
Code:
If JavaWindow("Client Information System").JavaButton("Vbutton").GetROProperty("enable") Then
         JavaWindow("Client Information System").JavaButton("Vbutton").click
End If
Reply
#4
Solved: 10 Years, 9 Months ago
Thanks Very much it worked.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to send/pass UFT Run Error Dialog as output value to main driver script lravi4u 0 328 11-05-2023, 03:55 PM
Last Post: lravi4u
  How do you Change Run mode mid script? Caleytown 6 6,521 03-25-2021, 08:27 AM
Last Post: RB26578
  picking different points in UFT using VB Script azjk786 0 902 12-14-2020, 09:57 AM
Last Post: azjk786
  script for mouseover rumitkon 2 1,736 02-20-2019, 12:52 AM
Last Post: rumitkon
  Call Stack in QTP Script smitapawar610 0 1,494 12-03-2018, 10:42 AM
Last Post: smitapawar610

Forum Jump:


Users browsing this thread: 1 Guest(s)