Results 1 to 3 of 3
  1. #1

    how to recognize a html page

    hello everybody,
    is there any way out wherein, i can consider a html page as an object so that whenever the page is shown , i can check whether it is like the original one or has there been any addition/omission of objects in it.


  2. #2
    Moderator JakeBrake's Avatar
    Join Date
    Dec 2000
    St. Louis - Year 2025

    Re: how to recognize a html page

    Yes. With set_window(), win_exists(), and a multitude of other WinRunner functions, you can do just what you asked.

  3. #3

    Re: how to recognize a html page


    Study the code attached.
    All pieces you need are in the code


    Elwin Wildschut

    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">const ObjectType[] = {&quot;html_text_link&quot;, &quot;html_combobox&quot;, &quot;html_rect&quot;, &quot;html_push_button&quot;, &quot;html_activex&quot;,
    &quot;html_check_button&quot;, &quot;html_edit&quot;, &quot;html_java_obj&quot;, &quot;html_listbox&quot;, &quot;html_plugin&quot;, &quot;html_radio_button&quot;};

    function window_learn_all_objects(in strWindow)
    auto i, skippy;
    auto strObj, strWin, strWindowName;
    auto strClass, strName, strUrl;

    #strWin=&quot;{class: window, MSW_class: html_frame}&quot;;

    #web_obj_get_info(strWin, &quot;html_name&quot;, strWindowName);



    strObj=&quot;{classbject,MSW_class:\&quot;!html.*\&quot;,index:&quot; &amp; i &amp; &quot;}&quot;;

    while( (web_obj_get_info(strObj, &quot;class&quot;, strClass)==E_OK)&amp;&amp;(i&lt;500))
    # if (obj_highlight(strObj)==E_OK)
    # {
    # if (web_obj_get_info(strObj, &quot;class&quot;, strClass)!=E_OK)
    # {
    # i=500;
    # break;
    # }
    # }
    #Do something with the objects i want
    if (index(&quot;html_text_link,html_edit,html_radio,h tml_rect,html_check_button&quot;,strClass) &gt; 0 )
    # if (strClass=&quot;html_rect&quot
    # {
    # int_rc = web_obj_get_info(strObj, &quot;URL&quot;, strUrl);
    # report_msg(strUrl);
    # if (substr(strUrl,length(strUrl),1)==&quot;#&quot skippy=1;
    # };

    if (skippy==0)
    #retrieve name
    web_obj_get_info(strObj, &quot;name&quot;, strName);
    #exclude exceptions i dont want
    if (index(&quot;1pix.gif,blabla&quot;,strName)!=0) skippy=1;

    if (skippy==0)
    report_msg(strClass &amp; substr(strName,1,50));


    #the ones i don't want
    if (index(&quot;html_table,html_row,html_cell&quot;,s trClass) == 0 )
    report_msg(&quot;class: &quot; &amp; substr(strClass,1,50));

    #next object
    strObj=&quot;{classbject,MSW_class:\&quot;!html.*\&quot;,index:&quot; &amp; i &amp; &quot;}&quot;;
    return i;

    window_learn_all_objects(&quot;&lt;YourWindowName& gt;&quot;</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">



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 05:23 PM.

Copyright BetaSoft Inc.