Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If/Else statement based off of CheckProperty
#1
Not Solved
I want to know how to write an If - Then statement based off of checking if something is editable or read only. How do I do this exactly?

What is wrong/missing from this...

Code:
[b]If [/b]Browser("Pavilion8 Console 3.7.2").Page("Pavilion8 Console.7.2").Frame("ControllerConfiguration2").WebEdit("CV1 Desired Coefficient").CheckProperty "class", "dashboard_editable" [b]Then[/b]
    Reporter.ReportEvent micPass, "APC 15: Is correctly set to editable"
    [b]Else[/b]
        Reporter.ReportEvent micFail, "APC 15: Is correctly set to read only"
    [b]End If[/b]
Reply
#2
Not Solved
You could either save the result of check property to a variable and then use that variable in your if else or use GetROProperty statement to get the run time property of the object, store that property to a variable and then compare this variable with the expected value of your property in if else block.
Reply
#3
Not Solved
Code:
If Browser("Pavilion8 Console 3.7.2").Page("Pavilion8 Console.7.2").Frame("ControllerConfiguration2").WebEdit("CV1 Desired Coefficient").[b]GetRoProperty("disabled")=0 [/b]Then

Reporter.ReportEvent micPass, "APC 15: Is correctly set to editable"
Else
Reporter.ReportEvent micFail, "APC 15: Is correctly set to read only"
End If
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Click after CheckProperty to a WebElement passed via Function argument fails naruoga 0 1,170 02-28-2019, 11:46 AM
Last Post: naruoga
  Help Waitproperty or Checkproperty with micGreaterThan() Code typhoon23 1 2,004 08-23-2017, 05:02 PM
Last Post: Ankur
  WaitProperty or checkproperty jove1776 5 10,743 10-21-2010, 02:25 PM
Last Post: jove1776
  Want a Boolean return for CheckProperty jdtester 1 2,845 06-04-2008, 01:38 AM
Last Post: FredMan

Forum Jump:


Users browsing this thread: 1 Guest(s)