SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 20
  1. #1
    Junior Member
    Join Date
    Nov 2002
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Browser(...).Navigate("url") doesn\'t work

    Hi,

    I recorded a test that opens a few pages and clicks some links sucessfully. Then when I want the browser to navigate to another url from within that page, i.e. there is no link for the new url on the page and I used Browser(...).navigate("url") to move to it, the browser just DOES NOT DO ANYTHING.

    The test is not failing, and the result sheet shows the node Browser.Navigate... with the correct target url in the right pane, but the browser does not actually go there?

    I tried quite a few tips from this forum, but all failed. Please let me know if you know what I might be doing wrong here.

    Thanks,
    Cher0kee

  2. #2
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Browser(...).Navigate("url") doesn\'t work

    Could be something related to cookies/some issue with your browser.

    To be sure its not cookies add the below line before navigate

    WebUtil.DeleteCookies
    Browser().Navigate "http://www.yoururl.com"
    Browser().Sync
    Browser().Page().Sync

  3. #3
    Junior Member
    Join Date
    Nov 2002
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Browser(...).Navigate("url") doesn\'t work

    Tarun,

    Thanks for the tip about cookies. My website does use cookies and it checks for them when I click different links on my pages.

    However I tried to the WebUtil.DeleteCookies method too but... no luck.

    Here's the problem in a simple form:

    1- I recorded a test case with www.hotmail.com in the "Record and Run Settings" dialog.

    2- When the Sign In page opened, I stopped the recording.

    3- In the Expert View, I copied the "Browser("Sign In")" line and cheged it to
    Browser("Sign In").Navigate("http://www.yahoo.com")

    When I play it back, it opens the hotmail sign in page and shows as if it is executing the navigate line too, then the test ends successfully but the browser still has the hotmail page in it and does not go the yahoo site.

    Please see if you could reproduce it and help me spot the problem.

    thanks,
    Cher0kee

    Here's the complete script:
    ---------------
    Browser("Sign In").Page("Sign In").WebButton("Sign In").Click

    WebUtil.DeleteCookies

    Browser("Sign In").Navigate("http://www.yahoo.com")
    Browser("Sign In").Sync
    -----------------

  4. #4
    Senior Member
    Join Date
    Feb 2005
    Location
    Northern Ireland
    Posts
    529
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Browser(...).Navigate("url") doesn\'t work

    EDIT:

    Try turning off the option to use a particular URL instead to record and playback on any browser instead in the record and run settings.

    That should fix your problem.
    I'm not a complete idiot - some parts are missing.

  5. #5
    Senior Member
    Join Date
    Feb 2005
    Location
    Northern Ireland
    Posts
    529
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Browser(...).Navigate("url") doesn\'t work

    Note, if you use the above code, you will need a systemutil.run "C:\where_ever_IEXPLORE.EXE_is_installed\IEXPLORE. EXE" line to open the IE browser in the first instance (Assuming IE of course, just replace Firefox or Netscape if applicable)
    I'm not a complete idiot - some parts are missing.

  6. #6
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Browser(...).Navigate("url") doesn\'t work

    OK... Try the below one

    Browser("Sign In").Page("Sign In").WebButton("Sign In").Click
    Browser("Sign In").Sync
    Browser("Sign In").Page("micClass:=Page").Sync

    Browser("Sign In").Navigate "http://www.yahoo.com"

  7. #7
    Junior Member
    Join Date
    Nov 2002
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Browser(...).Navigate("url") doesn\'t work

    Unfortunately, none of the above solutions worked.

    I was suspicious of some IE security settings, so I changed them to Low, but that didn't help either.

    Maybe it needs a little more research on my part [img]images/icons/frown.gif[/img]

    cher0kee

  8. #8
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Browser(...).Navigate("url") doesn\'t work

    Why dont you try the below things
    1. Uninstall your IE and update it to IE 6.0.
    2. Uninstall QTP and reinstall it

    Some times these kinds of actions do help.

  9. #9
    Junior Member
    Join Date
    Nov 2007
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Browser(...).Navigate(\"url\") doesn\'t work

    hey,

    could pls let me know if you were able to solve the problem?
    I am facing the same issue here and i have tried all the above solutions.
    The Navigate function does not work for me [img]/images/graemlins/frown.gif[/img]
    below is the code used by me:
    ------------------------------
    WebUtil.DeleteCookies


    SystemUtil.Run "iexplore.exe", "URL1"

    Browser("").Sync
    Browser("").Page("micClass:=Page").Sync

    Browser("").Navigate "URL2"
    ------------------------------

    i need to perform some action on URL1 and then navigate to URL2, but QTP does not do that. It passes the step but the browser is still at URL1.
    thanks,
    vini
    ~~Do unto others as you would have them to do unto you....anonymous

  10. #10
    Super Member FredMan's Avatar
    Join Date
    Oct 2007
    Location
    Lenexa, Kansas
    Posts
    1,218
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Browser(...).Navigate(\"url\") doesn\'t work

    Try this.
    I just ran this with no problems. I enabled the Record and run test on any open browser radio button in the Record and Run Settings dialog box:

    SystemUtil.Run "iexplore.exe", "www.cnn.com"
    Browser("CNN.com - Breaking News,").Page("CNN.com - Breaking News,").Link("Strong earthquake shakes").Click
    Browser("CNN.com - Breaking News,").Page("Strong earthquake shakes").Link("Hot Topics").Click
    Browser("CNN.com - Breaking News,").Navigate("http://www.yahoo.com")

    Correct me if I'm wrong but this should work.
    Onward thru the fog...

 

 
Page 1 of 2 12 LastLast

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 10.00%
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:21 PM.

Copyright BetaSoft Inc.