SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 8 of 8
  1. #1
    Senior Member
    Join Date
    Feb 2003
    Posts
    141
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Html tag elimination

    I have the button with the title as
    html tag
    body tag
    formatting tags
    title of the button
    closing formatting tags.
    closing body tags.
    closing html tags.

    From this I want to extract only title of the button . How could I do it.?

  2. #2
    Member
    Join Date
    Oct 2002
    Location
    Trichy, Tamil Nadu, India
    Posts
    60
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Html tag elimination

    Use String functions, ......
    Hari,
    Consultant-QA,
    GFT Technologies,
    India.

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

    Re: Html tag elimination

    use the inner_html (or outter_html) properties to get the html source... then parse it like aries noted...

  4. #4
    Senior Member
    Join Date
    Feb 2003
    Posts
    141
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Html tag elimination

    Thank you EngArchEney and Aries. I have used String functions and it worked out. I also need trim functionality. Is there any predefined functions in TSL. ?

    Trails made so far:
    1. I have used substr and ascii function to eliminate the blank spaces, but in vain.

  5. #5
    Member
    Join Date
    Oct 2002
    Location
    Trichy, Tamil Nadu, India
    Posts
    60
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Html tag elimination

    Hi Javasans,

    Try this through get property method,

    attribute/<prop_name>

    It enables you to access the specified internal property
    of the object. The property is working only in Internet explorer.


    1. I have used substr and ascii function to eliminate the blank spaces, but in vain.
    Ans:- Hey, why you are not aware of compiled module, try to put these kind of frequently using methods in Compiled module.
    Hari,
    Consultant-QA,
    GFT Technologies,
    India.

  6. #6
    Member
    Join Date
    Oct 2002
    Location
    Trichy, Tamil Nadu, India
    Posts
    60
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Html tag elimination

    In my previous message I tried to sent the following

    attribute/(value)

    for eg.
    attribute/title

    In my previouse message I put it in lessthan and greater than brace. The HTML page is considered it as html-tag...

    Sorry for the inconvenience....
    Hari,
    Consultant-QA,
    GFT Technologies,
    India.

  7. #7
    Senior Member
    Join Date
    Feb 2003
    Posts
    141
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Html tag elimination

    Thank you Aries. I have written that logic in compiled modules. Inside the Compiled module , I couldn't get it with substr and ascii functions.

  8. #8
    Member
    Join Date
    Oct 2002
    Location
    Trichy, Tamil Nadu, India
    Posts
    60
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Html tag elimination

    Hi Javasans,

    The following functions would be helpful for you. The followig functions are also available in "\\samples\\utils\\misc"

    its test type is "Compiled Module".

    revert back

    public function ltrim(in s)
    {
    auto i;
    auto src = s;

    while ((index(src, " ") == 1) &#0124;&#0124; (index(src, "\t") == 1))
    src = substr(src, 2);

    return(src);
    }


    # -------------------------------------------------------------------------------
    # DESCRIPTION: The function removes trailing spaces and tabs in the string s.
    #
    # PARAMETERS: in s - character string.
    #
    # RETURN CODE: A string that is the copy of s where trailing spaces and tabs are
    # removed.
    #
    public function rtrim(in s)
    {
    auto i;
    auto src = s;

    while ((rindex(src, " ") == length(src)) &#0124;&#0124; (rindex(src, "\t") == length(src))) {
    src = substr(src, 1, length(src) - 1);
    if (length(src) == 0)
    break;
    }

    return(src);
    }
    Hari,
    Consultant-QA,
    GFT Technologies,
    India.

 

 

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

Copyright BetaSoft Inc.