SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    clicking links on a dynamic page

    User Atif Iqbal (atif_iqbal_kureshi@yahoo.com.nospam) posted:

    Hi

    i am new to WinRunner and i wanted to know how can i
    automate the process of clicking on weblinks on an ASP
    page which are generated at runtime.

    thanks in advance for any leads on this.

    Atif Iqbal

    __________________________________________________

  2. #2
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: clicking links on a dynamic page

    User (asim.baig@cressoft.com.pk.nospam) posted:
    Try this
    #
    counterVar = 0;
    while (counterVar < totalDynamicLinkCount) {

    web_link_click("{class: object, MSW_class: html_text_link, location: "&
    counterVar &"}");
    }
    #

    in the above pasted code snippet we are accessing the dynamic html links with
    the location parameter
    set the initial value of the counterVar to the location of the first link e.g if
    [1] and [2] are the 5th and 6th links
    on your GUI then set counterVar to 4 if you wanna access link number 5, 6 and so
    on.

    Dont forget first to set the window in which the subject links exist by using
    win_activate ();
    set_window ();
    functions.

    Asim Zafar
    asim.baig@cressoft.com.pk
    *************
    Atif Iqbal <atif_iqbal_kureshi@yahoo.com> on 06/07/2002 10:49:13 AM

    Please respond to winrunner@yahoogroups.com

    To: winrunner@yahoogroups.com
    cc: (bcc: Asim Baig/CresSoft)

    Subject: [winrunner] clicking links on a dynamic page
    Hi

    i am new to WinRunner and i wanted to know how can i
    automate the process of clicking on weblinks on an ASP
    page which are generated at runtime.

    thanks in advance for any leads on this.

    Atif Iqbal

    __________________________________________________

  3. #3
    Senior Member
    Join Date
    Jun 2002
    Location
    Hadera, Israel
    Posts
    313
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: clicking links on a dynamic page

    User Roman Zilber (romanz@enigma.com.nospam) posted:

    Try it!

    invoke_application("iexplore",
    7","",3);
    const SITE = "{ class: window, MSW_class: html_frame, html_name:
    \"!XCam2.*\"}";


    set_window(SITE,40);
    #win_highlight(SITE, 4);

    i = 0;
    do
    {
    set_window(SITE,0);
    TEXT_LINK = "{ class: object, MSW_class: html_text_link, html_name:
    \"!.*\", location: "i++"}";

    x = obj_highlight(TEXT_LINK,2);
    }
    while(x== 0);

    i = 0;
    do
    {
    IMG_LINK = "{ class: object, MSW_class: html_rect, html_name:
    \"!.*\", location: "i++"}";


    }
    while(!obj_highlight(IMG_LINK,2));



  4. #4
    Senior Member
    Join Date
    Jun 2002
    Location
    Hadera, Israel
    Posts
    313
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: clicking links on a dynamic page

    User Roman Zilber (romanz@enigma.com.nospam) posted:

    I think it's not so primitive. Like this (and my example), first you need
    some changes in the code:

    Try this
    #
    counterVar = 0;
    while (counterVar < totalDynamicLinkCount) {

    web_link_click("{class: object, MSW_class: html_text_link, location: "&
    counterVar &"}");
    web_sync(100);
    obj_click("Back Button",LEFT)...
    web_sync(100);
    }
    #
    second - some of the links opened in different window, other have
    redirection to other page ("click back will not be work")
    ....
    If you just need check that the links return not error pages or you have
    regression test, better way not to use WR at all. Try "httpunit"
    (http://httpunit.sourceforge.net/doc/Cookbook.html) in Java.
    in the above pasted code snippet we are accessing the dynamic html links
    with
    the location parameter
    set the initial value of the counterVar to the location of the first link
    e.g if
    [1] and [2] are the 5th and 6th links
    on your GUI then set counterVar to 4 if you wanna access link number 5, 6
    and so
    on.

    Dont forget first to set the window in which the subject links exist by
    using
    win_activate ();
    set_window ();
    functions.

    Asim Zafar
    asim.baig@cressoft.com.pk
    *************
    Atif Iqbal <atif_iqbal_kureshi@yahoo.com> on 06/07/2002 10:49:13 AM

    Please respond to winrunner@yahoogroups.com

    To: winrunner@yahoogroups.com
    cc: (bcc: Asim Baig/CresSoft)

    Subject: [winrunner] clicking links on a dynamic page
    Hi

    i am new to WinRunner and i wanted to know how can i
    automate the process of clicking on weblinks on an ASP
    page which are generated at runtime.

    thanks in advance for any leads on this.

    Atif Iqbal

    __________________________________________________

 

 

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 12.50%
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 07:54 AM.

Copyright BetaSoft Inc.