SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Oct 2008
    Posts
    42
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How to launch URL from datasheet

    Hello all,

    Could you please help me as Iam new to this QTP scripting:
    1. How to launch url which is saved in my Global/Local atasheet?
    2. How to save a new URL in the datasheet

    For eg:
    1. Launch the browser
    2. Get the url from the Row1 Col1 in datasheet(local/global)
    3. Navigate to a page
    4. Copy this new url and save into Row1 but in Col2

    And also if I have different urls in Col1 how do i loop this test?

    Please help...

    'Run browser
    SystemUtil.Run "iexplore", sUrl

    Thanks,
    RND

  2. #2
    Member
    Join Date
    Oct 2005
    Location
    India
    Posts
    36
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to launch URL from datasheet

    Call Invoke_Application("www.google.com")

    Sub Invoke_Application(App_URLPath)

    Dim App_ObjIE,count1
    SystemUtil.CloseDescendentProcesses
    Set App_ObjIE = CreateObject ("InternetExplorer.Application")
    App_ObjIE.Visible = True
    App_ObjIE.Navigate App_URLPath

    End Sub




    strTotRowCnt = DataTable.GetSheet("Global").GetRowCount


    dtLaunchUrl = DataTable("strLaunch_Url",dtGlobalSheet)

    For iter = 1 To strTotRowCnt
    DataTable.SetCurrentRow(iter)
    dtLaunchUrl = DataTable("strLaunch_Url",dtGlobalSheet)
    Call Invoke_Application dtLaunchUrl
    getDestUrl = Browser("browser").Page("xyz").GetROproperty("url" )
    DataTable("strDestination_Url",dtGlobalSheet) = getDestUrl
    Browser("browser").Close
    Next


    Note:

    1. Have the page object in the repository and use regular expressions
    2. Create two columns in the global sheet with the column names strLaunch_Url,strDestination_Url

    Try this, All the best
    praveen Kumar Araveti

  3. #3
    Member
    Join Date
    Oct 2008
    Posts
    42
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to launch URL from datasheet

    Hi Praveen,

    Thanks for you help.Sorry,I forgot to add one more step.After copying and saving the new url in strDestination_Url column in datasheet, I want a browser to open with this new url.

    I tried to add a step to launch the destination url but its failing.

    For example:
    After the browser close,I added this step

    dtLaunchUrl = DataTable("strDestination_Url",dtGlobalSheet)


    Can you please help with that?Thanks for you time.

    Reena

  4. #4
    Member
    Join Date
    Oct 2008
    Posts
    42
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to launch URL from datasheet

    Hi,
    Thats fine..Don't worry...I got it.
    But I need another help trying to read a message and click on a button in my app.

    Here is my function which Iam trying to getinto:Also please see my screenshot
    ************************************************** ******************
    Function FnClickMesgBtn(argDesiredPopUpBtn,WinDiagName)

    Dim StrEnd, StrPageStart, strBrowStart, strPage, strBrow, strwatch
    strEnd = ".*"
    strPageStart = "title:=.*"
    strBrowStart = "name:=.*"

    strPage = strPageStart&WinDiagName &strEnd
    strBrow = strBrowStart&WinDiagName &StrEnd

    'This is my button description
    set buttonDesc= description.Create()
    buttonDesc("name").Value = argDesiredPopUpBtn
    buttonDesc("html tag").Value = "INPUT"

    Set btnPopColl = Browser("micclass:=Browser","Title:=Online Form").Page("micclass:=Page","Title:=Online Form").ChildObjects(buttonDesc)
    'MesgText=FnGetMesgText(argMesgText)

    OutText= Browser("micclass:=Browser","Title:=Online Form").Page("micclass:=Page","Title:=Online Form").WebElement("Your session has expired").GetROProperty("outertext")

    If btnPopColl.count > 0 then
    btnPopColl(0).click 'click the button
    Passed "Button was clicked","Text retrived is =" & OutText 'report pass
    clickPopUpBtn="TRUE" 'return status
    else
    WARN "Button not clicked","No text retrived=" & argDesiredPopUpBtn ' report failed
    clickPopUpBtn="FALSE"
    end if
    End Function
    ************************************************** *************
    Please help...

    Thx,
    RND

  5. #5
    Member
    Join Date
    Oct 2008
    Posts
    42
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to launch URL from datasheet

    Can any one help me please with the above script??

    Thx,
    RDN

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 02:14 AM.

Copyright BetaSoft Inc.