SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Jan 2011
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Finding inputbox name

    Could someone please help me with this one.

    I am trying to get the name of a checkbox (OFFICE) dialogue and am having hard time to find it. Here is the code:

    //<TD class=leftCell>Office: </TD>
    myofficeplusbtn = myPage["NativeWebObject"]["Find"]("innettext","*Office:","TD");

    Log["Message"](myofficeplusbtn["innertext"]);

    I tried various combinations like inneretext, value but nothing works. Please see the attached

    Thank you,
    Akaul
    Attached Images Attached Images

  2. #2
    Senior Member
    Join Date
    May 2004
    Posts
    1,196
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Finding inputbox name

    Hi Akaul,

    Try this code and let me know whether it works for you:
    <font class="small">Code:</font><hr /><pre> //&lt;TD class=leftCell&gt;Office: &lt;/TD&gt;
    var myofficeplusbtn = myPage["Find"](["innettext", "tagName"], ["Office: ","TD"], 100);
    if (false == myofficeplusbtn.Exists) {
    Log.Error("The object is not found");
    }
    else {
    Log["Message"](myofficeplusbtn["innertext"]);
    }</pre><hr />
    Best regards,
    David - SmartBear Support

  3. #3
    Member
    Join Date
    Jan 2011
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Finding inputbox name

    It did not work...?
    Akaul

  4. #4
    Senior Member
    Join Date
    May 2004
    Posts
    1,196
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Finding inputbox name

    Hi Akaul,

    In this case, please save the HTML code of the tested page to a file and post it here or send to us via the Contact Support form. You can get the HTML code of the page using this script:
    <font class="small">Code:</font><hr /><pre> var htmlObj = page.Application.Document.getElementsByTagName("ht ml")[0];
    Log.Message("See HTML in Remarks", htmlObj.outerHTML);</pre><hr />
    Best regards,
    David - SmartBear Support

  5. #5
    Member
    Join Date
    Jan 2011
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Finding inputbox name

    I tried this code again and it worked, sorry for the confusion. However, could you please help me with this situation. I read the label of a check box and then try to select it but have no success so far (I can find teh box OK)

    var checkboxlabel = myPage["NativeWebObject"]["Find"]("innerText","Bridges","label");

    mycheckbox = myPage["NativeWebObject"]["Find"]("type","checkbox","input");
    if(mycheckbox["Exists"])
    mycheckbox["ClickChecked"](true);

    PLEASE SEE THE ATTACHED
    Attached Images Attached Images

  6. #6
    Senior Member
    Join Date
    May 2004
    Posts
    1,196
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Finding inputbox name

    Hi Akaul,

    As far as I understand, labels for check boxes on the tested pages are separate controls and not just part of check-box controls themselves. Please note that finding the needed check box by the 'type=checkbox' condition is useless since there are a lot of objects that satisfy this condition.

    Please post here the HTML code of the page so I can see how it is formed and suggest you something.
    Best regards,
    David - SmartBear Support

  7. #7
    Member
    Join Date
    Jan 2011
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Finding inputbox name

    Hi David,
    Thank you for your help, I will post the HTML code probably tomorrow. However, could you please help me with these 2 issues. I am launching IE and typing in the address:

    TestedApps["iexplore"]["Run"](1, true);

    page = Aliases["iexplore"];

    page = iexplore["ToURL"]("http://endenweb05/default.aspx#");

    myPMRC = page["NativeWebObject"]["Find"]("src","*logo_pb.jpg","img");

    Actually what I want to do is to put address(http://endenweb05) as command line papameter in TestedApps but still return the page.

    Also I want to check if the expected page is already up then dont launch.

    Thank you,
    Akaul

  8. #8
    Senior Member
    Join Date
    May 2004
    Posts
    1,196
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Finding inputbox name

    Hi Akaul,

    You can add the needed parameter to a tested application using the code below:
    <font class="small">Code:</font><hr /><pre>
    TestedApps.iexplore.Params.SimpleParams.CommandLin eParameters = "http://endenweb05";</pre><hr />

    [ QUOTE ]
    Also I want to check if the expected page is already up then dont launch.

    [/ QUOTE ]Just check the existence of the page using the Wait* methods. Please find more information in the Waiting for a Process or Window Activation and WaitPage Method (Process Objects) help topics.
    Best regards,
    David - SmartBear Support

 

 

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.11%
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 04:08 AM.

Copyright BetaSoft Inc.