Results 1 to 3 of 3
  1. #1

    SelectByText Weblist parameterise element

    Hi Tarun

    I am using your functions

    Function IsRegEqual(s_Text, s_Pattern)
    Dim regEx, retVal ' Create variable.
    Set regEx = New RegExp ' Create regular expression.
    regEx.Pattern = s_Pattern ' Set pattern.
    regEx.IgnoreCase = True
    IsRegEqual = regEx.Test(s_Text)
    End Function

    Function SelectByText(objWebList,s_Text,b_RegExpression)
    Set obj_Options=objWebList.object.options
    i_Count =obj_Options.length - 1
    For i=0 to i_Count
    If b_RegExpression And IsRegEqual(obj_Options(i).text,"^"+ s_Text) Then
    Exit for
    Elseif Lcase(s_text)=Lcase(obj_Options(i).text) then
    Exit for
    End If
    End Function


    SelectByText Browser(A).Page(B).WebList(C),".*rtla.*",TRUE

    its working fine. But when I try to pass value to this regular expression as parameter like

    k22= DataTable.Value("acc1", dtGlobalSheet)
    (here acc1 is rtla)
    SelectByText Browser(A).Page(B).WebList(C),".*k22.*",TRUE

    it doesn't select value from the weblist. Can you please help me? I tried all options but couldn't make it work.


  2. #2

    Re: SelectByText Weblist parameterise element

    hi...I found the solution. Sorry for inconvenience. If you want, you can delete this post. I found the solution at one of the previous post here.

  3. #3

    Re: SelectByText Weblist parameterise element

    Lets share the solution

    k22= DataTable.Value("acc1", dtGlobalSheet)
    (here acc1 is rtla)
    SelectByText Browser(A).Page(B).WebList(C),".*" & k22 & ".*",TRUE



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 03:55 PM.

Copyright BetaSoft Inc.