Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If..Then..Else..with checkpoint
#1
Solved: 11 Years, 4 Months ago
Dear All,

I tried to write a if..then..else statement using the checkpoint value. However, it is obvious that I made mistakes.
Please help.



Code:
SiebApplication("Siebel Energy (CMS DR)").SiebScreen("Appointment Booking").SiebView("TG Appointment Booking").SiebApplet("Appointment Schedule").SiebButton("Query").Click
SiebApplication("Siebel Energy (CMS DR)").SiebScreen("Appointment Booking").SiebView("TG Appointment Booking").SiebApplet("Appointment Schedule").SiebButton("Go").Click
SiebApplication("Siebel Energy (CMS DR)").SiebScreen("Appointment Booking").SiebView("TG Appointment Booking").SiebApplet("Appointment Schedule_2").SiebText("Owner Position").Output CheckPoint("Owner Position")



Code:
If CheckPoint("Owner Position")<>"READONLY" Then
msgbox "error"
else
SiebApplication("Siebel Energy (CMS DR)").SiebMenu("Menu").Select "File\\File - Logout"
end if
Reply
#2
Solved: 11 Years, 4 Months ago
you can try this
Code:
a = SiebApplication("Siebel Energy (CMS DR)").SiebScreen("Appointment Booking").SiebView("TG Appointment Booking").SiebApplet("Appointment Schedule_2").SiebText("Owner Position").Output (CheckPoint("Owner Position"))

and use this for your comparison.

I guess you want to get the text in SiebText("Owner Position") and need to check whether it is "READONLY" or not, right?
if yes then you can simply use GetROProperty("text")
try this and let me know how it works
Code:
Val = SiebApplication("Siebel Energy (CMS DR)").SiebScreen("Appointment Booking").SiebView("TG Appointment Booking").SiebApplet("Appointment Schedule_2").SiebText("Owner Position").GetROProperty("Text")
if Val <> "READONLY" then
....

Please do not forget to wrap your code.

Reply
#3
Solved: 11 Years, 4 Months ago
the code you provided is really useful. Thanks

However, can I use it to get TRUE/FALSE from checkboxes?

Code:
Val=SiebApplication("Siebel Energy (CMS DR)").SiebScreen("Contact").SiebView("All Contacts").SiebApplet("Contact").SiebCheckbox("Fitter Flag").GetROProperty("Value")
msgbox Val

I do it this way.
However, the msgbox didn't have anything.

Thanks
Jody
Reply
#4
Solved: 11 Years, 4 Months ago
I dont think there is any property for checkbox which output as true/false except 'visible'.
try with checked, it must be returning "ON/OFF". you can manipulate this further if you really need it as True/False.

Reply
#5
Solved: 11 Years, 4 Months ago
There is a property called Checked for a checkbox which returns a boolean per the dyanmics of the checkbox.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#6
Solved: 11 Years, 4 Months ago
I have suggested for that in my reply, as per my observation, usually for most of the web application it comes as ON/OFF.

Reply
#7
Solved: 11 Years, 4 Months ago
Sorry saket, I confused your checked to checkbox Set property because checked returns 1 or 0.

Yes, my post is immaterial here as the solution is already in the previous one.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#8
Solved: 11 Years, 4 Months ago
Hi yuetling926 ,

Usually for retreiving the checkbox's status(i.e selected or not) the below properties could be used .
--> Checked
--> Selected

Check out the below examples for more info.:

Code:
In Windows Appl,  
WinCheckBox("...").GetROProperty("Checked")  Returns  "ON/OFF" ( ON-->True,OFF-->False)

IN SAP Appl,
SAPGuiCheckBox("Calculate tax").GetROProperty("checked")   Returns nothing(empty msgbox)
SAPGuiCheckBox("Calculate tax").GetROProperty("Selected")  Returns "True/Fasle"

In Web Applications,
WebCheckBox("..").GetROProperty("Checked") Returns 0/1   ( 0 --> False , 1 --> True )
So similarly you try out for Seibel Appl with "Checked/Selected" properties & implement accordingly.
Reply
#9
Solved: 11 Years, 4 Months ago
Hi Srikanth,

I have seen you that you always come up with some good and nice examples in your replies, but that not with proper tags applied with codes.
Request you to please wrap your codes to make it more readable.

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Wink standard checkpoint and text checkpoint kiran10_rm 1 5,363 11-18-2010, 05:16 AM
Last Post: nandu
  fullscreen and bitmap checkpoint error "Cannot create bitmap checkpoint" meuline 2 4,722 12-10-2009, 09:17 PM
Last Post: meuline
  Checkpoint problems: Checkpoint starts before web page is loaded & therefore fails! IdontGetIt 1 3,921 11-20-2009, 11:45 AM
Last Post: basanth27
  Not able to add any other Checkpoint apart from Standard Checkpoint Rachna 7 8,656 04-02-2009, 11:05 AM
Last Post: nandu
  Not able to add any other Checkpoint apart from Standard Checkpoint Rachna 0 1,715 03-26-2009, 03:14 PM
Last Post: Rachna

Forum Jump:


Users browsing this thread: 2 Guest(s)