Forum Discussion

4 Replies

  • Ravik's avatar
    Super Contributor
    Check Property is used to Find the perticlular Item in a Perticular location.

    Suppose you want to check "Google" from so you need to write code like.

    aqObject.CheckProperty("Object", "Property", Condition, "Value")

    Object meas that your location - sys.process("Internerexplorer").Panel(0).Cell(1, 0) like that

    Property means that, what you want to be check - InnerText, wText, context ...

    Condition like Equal, notequal, greaterta, lessthen.......

    Value whatever you want to compaire.


    aqObject.CheckProperty("sys.process("Internerexplorer").Panel(0).Cell(1, 0)", "InnerText" cmpEqual "Google")

    What it does. It check Google word on Google web site (On perticular location only)

    It Might help you.



  • samuel_1's avatar
    Occasional Contributor
    it does not take into account whitespaces and new line feed between words...
  • AlexeyK's avatar
    SmartBear Alumni (Retired)


    Try regular expressions and the aqString.StrMatches method.

    After reading your previous message, I'd suggest that you use the following expression in your test:

      welcome[ \n]*john[ \n]*\[[ \n]*Log Off[ \n]*\]

    Here is an example:

    Sub Test

      ' The string that you get in your test

      checkedString = "welcome john [ Log Off ]"

      ' The sought-for regular expression

      searchPattern = "welcome[ \n]*john[ \n]*\[[ \n]*Log Off[ \n]*\]"

      ' Compare strings

      If aqString.StrMatches(searchPattern, checkedString) Then

        Log.Message "Success"


        Log.Warning "Not found"

      End If 

    End Sub