Results 1 to 4 of 4
  1. #1

    Is something wrong with regular expression? Help please

    Based on page number I have an object that is identified as below

    {class: object,MSW_class: html_rect,html_name: "eStatementImageRetrieve.asp?img=1"} for page 1

    {class: object,MSW_class: html_rect,html_name: "eStatementImageRetrieve.asp?img=2"} for page 2

    I am trying to verify for the given page number corresponding object is loaded on the page. And I am doing that using regular expression as in below statement. I donít get any syntax error, but my if statement is not executed and the flow goes in else statement. Here is the code

    if (obj_exists("{class: object,MSW_class: html_rect,html_name: \"eStatementImageRetrieve.asp?img=!.[0-9]\"}") == E_OK)

    tl_step(strProcessUnderTest "Validation", 0, stropr "-" strStatementtype " E-Statement print page process executed successfully");


    tl_step(strProcessUnderTest "Validation", 1, stropr "-" strStatementtype " E-Statement print page process execution failed");

    What should be be the right way of the regular expression
    Also I am using this expression pagenum = tmpcount -1, and while debugging the pagenum is not evaluated. Looks like as if something wrong with my expression usage.



  2. #2

    Re: Is something wrong with regular expression? Help please

    I'm not positive that a RegExp is allowed in this situation, but if it is, you need the "!" at the very beginning of the string, e.g.: "!eStatementImageRetrieve.asp?img=[0-9]" (or possibly "!eStatementImageRetrieve.asp?img=[0-9][0-9]*" if the page number could be more than one digit).

    Charles Reace

    "Any sufficiently advanced bug is indistinguishable from a feature." -Bruce Brown
    web site | [url=http://www.ebookworm.us/[/url]

    [i]...Sound trumpets! Every trumpet in the host! / Sixty thousand, on these words, sound, so high the mountains sound, and the valleys resound.</i] (The Song of Roland)

  3. #3

    Re: Is something wrong with regular expression? Help please

    Not sure if the regular expression is valid in this situation.

    If it the part containing the regular expression, try

    (obj_exists("{class: object,MSW_class: html_rect,html_name: \"!eStatementImageRetrieve.asp?img=[0-9]\"}") == E_OK)

    Deplaced the '!'. Removed the '.'.


  4. #4

    Re: Is something wrong with regular expression? Help please

    LRWRnovice, is now banned. Charles, why are you replying to his posts if you know he keeps breaking the rules...

    Just look at this guys's posts in the last few months... 256 posts and counting of constantly breaking every rule we have!

    Posting Duplicates, Uing the Help Please or ******, etc...
    http://www.qaforums.com/cgi-bin/foru...es&File=temp-2 452683-094720-Hpp2.cgi&Total=89&StartAt=A:000003

    Please do NOT encourage users like those!

    AJ Alhait
    BetaSoft Inc.
    AJ Alhait
    BetaSoft Inc.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 05:53 PM.

Copyright BetaSoft Inc.