Results 1 to 5 of 5
  1. #1

    How to pass dynamic value in DP

    I have below code. I want to pass dynamic value in DP.How can I click on Link object? Anybody can pls help me?

    ''SplitV is dynamic value That I am getting from Web table like below
    SplitV = Browser("title:=Break Mobile").Page("url:=http://m.break.com").WebTable("name:=Thumbnail").GetCellD ata(1, 2))

    Var1 = "innerhtml:="
    Var2 = SplitV

    call ClickLink(var1,var2)

    Function ClickLink(var1,var2)
    Browser("title:=Break Mobile").Page("url:=http://m.break.com").Link(Var1&Var2).Click
    End Function

    I am getting below error: Cannot identify the object "[ Link ]" (of class Link). Verify that this object's properties match an object currently displayed in your application

  2. #2

    Re: How to pass dynamic value in DP

    Set linkSplitV = Description.Create()
    linkSplitV("html tag").Value = "A"
    linkSplitV("innerhtml").Value = SplitV

    Browser("title:=Break Mobile").Page("url:=http://m.break.com").Link(linkSplitV).Click


  3. #3

    Re: How to pass dynamic value in DP


    The problem in your code was that you were specify the link name as "innerhtml:=XXXXXXX" (SplitV = XXXXXXX).

    Whereas Janna is specifying the correct property value -

    If you want use your code you can try -

    Browser("title:=Break Mobile").Page("url:=http://m.break.com").Link("innerhtml:="Var2).Click

  4. #4

    Re: How to pass dynamic value in DP

    Hey Thanks jbotash and JackalN80.
    The above code is working for values like
    SplitV1 = "QTPQTPQTP"
    But its not working for
    SplitV2 = "QTPQTPQTP??" (becuase special characters are involved in SplitV2 )
    Can you please provide me a function(or script) for "How to generate Regular expression"(I dont want to depend on OR)


  5. #5

    Re: How to pass dynamic value in DP

    Now is syntax error in your code.
    It should be concatenation in description like that:
    Link("innerhtml:=" & Var2).Click

    How can somebody provide RegExpression Generator without knowing what is base in the string you want to represent with RegularExpression?

    Try to work on it like that:
    1. Define expected base as I've mentioned above
    2. Cut the rest, using ".*"
    If you would not successful - post your code and ask for help.




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 07:13 PM.

Copyright BetaSoft Inc.