Page 2 of 2 FirstFirst 12
Results 21 to 25 of 25

Thread: Descriptive Programming Concepts - Good thread for Starters

  1. #21
    Expert Member
    Join Date
    Sep 2007
    Answers
    110

    Re: Descriptive Programming Concepts - Good thread for Starters

    Use .* for regularexpressions

    ex:
    browser("name:=yahoo.*").page("title:=yahoo.*").webedit("name:=usern.*).set "Rajaputra"

    __________________

    Thanks & Regards!!
    RAJAPUTRA

  2. #22
    Expert Member
    Join Date
    Apr 2008
    Answers
    1,859

    Re: Descriptive Programming Concepts - Good thread for Starters

    Hai friend,

    open qtp and paste this in expert view, so that you can have basic idea regarding regular expressions

    try this

    function regexptest(patrn, strng)

    dim regex, match, matches ' create variable.
    Set regex = new regexp ' create a regular expression.
    Regex.pattern = patrn ' set pattern.
    Regex.ignorecase = true ' set case insensitivity.
    Regex.global = true ' set global applicability.
    Set matches = regex.execute(strng) ' execute search.
    For each match in matches ' iterate matches collection.
    Retstr = retstr & "match found at position " retstr = retstr & match.firstindex & ".
    Match value is '" retstr = retstr & match.value & "'." & vbcrlf
    next
    regexptest = retstr
    end function

    msgbox(regexptest("is.", "is1 is2 is3 is4"))

    thanks
    deepa

    Last edited by deepasree; 06-01-2009 at 07:25 AM.

  3. #23
    Junior Member
    Join Date
    Jul 2009
    Answers
    1

    Re: Descriptive Programming Concepts - Good thread for Starters

    can some one give a small code which explain all type of commonly used QTP frame work?


  4. #24
    Expert Member
    Join Date
    Apr 2008
    Answers
    1,859

    Re: Descriptive Programming Concepts - Good thread for Starters

    Quote Originally Posted by Anuj007 View Post
    can some one give a small code which explain all type of commonly used QTP frame work?
    hai friend,

    QTP framework is not a small thing which can be explained with a small block of code. One more thing please start a new thread when you have a question.

    Thanks
    Deepa


  5. #25

    Re: Descriptive Programming Concepts - Good thread for Starters

    Quote Originally Posted by Sreeman03 View Post
    how to write descriptive programming for regular expression for web based applications in qtp.
    Example:
    tmp1 = Browser("micClass:=Browser").Page("micClass:=Page").WebElement("html tag:=B","innertext:=My Certifications.*")


Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact