18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

Need help on regular expression

anilkumaranilkumar Members
edited November -1 in Sahi - Open Source
In my application i need to search with Order id based on order id the results are generated .

Since the results window elements are dynamic i need to use reqular expressions.

After recording the scripts the script as below:
_click(_button("Search Order"));
_popup("undefined")._setValue(_textbox("agreementNumber"), "568545");
_popup("undefined")._click(_button("Search"));
_popup("undefined")._setSelected(_select("orderSearchResult"), "N RMTDLR 518792753 568545 4162578643 15-Mar-2012 12:15 Completed in Billing TESTEADY,MONICA");

""N RMTDLR 518792753 568545 4162578643 15-Mar-2012 12:15 Completed in Billing TESTEADY,MONICA"

the entire above field is a dynamically generated based on order id.(with different order id the details are going to change).

can please some one help to write regular expression for above script or any other alternative.



Below is the html code for that script:


<select name="orderSearchResult" size="15" ondblclick="buttonAction('open')" onchange="orderValueChanged()" style="font-family: Courier New; font-size: 8pt; WIDTH: 950px"><option value="" selected="selected">Lock  Appl.   Queue     BAN #      Agmnt #   Mobile #    Creation Date       Status                       Name                           
</option>
<option value="568545">N     RMTDLR            518792753  568545    4162578643  15-Mar-2012 12:15   Completed in Billing         TESTEADY,MONICA                
</option></select>


OS: Window XP
Browser: IE8
build2011-07-19

Thanks,
Anilkumar

Comments

  • Hi All,

    Please help me on above issue. right now i am struck with that issue.

    Thanks,
    AnilKumar
  • Every business owner should understand that they can find their customers on social networking websites. You should make sure your Social networking company is also on one or more of these social media sites. Determine which sites your customers belong to, and incorporate them into your overall marketing stragey; if you don't, you may be letting new customers and strong customer relationships slip away from you.
  • Hi Anil,

    Try with this..

    _popup("undefined")._setSelected(_select("orderSearchResult"), "^N ");
  • Hi Rajathummla,

    Thanks for response.

    for some reason its is not working for me...and i am getting error message as below when i use.

    can you please help me on this issue.

    "
    _popup("undefined")._setSelected(_select("orderSearchResult"), "^N");
    Error: Option not found: ^N
    No trace available
    Click for browser script at Mar 19, 2012 6:18:55 PM".

    Thanks,
    Anilkumar
  • Try with this..
    _popup("undefined")._setSelected(_select("orderSearchResult"), "/^N/ ");

    OR

    _popup("undefined")._setSelected(_select("orderSearchResult"), "/.*/ ");
  • Hi Anil,

    Try with this..

    _popup("undefined")._setSelected(_select("orderSearchResult"), "^N RMTDLR ");
Sign In or Register to comment.