SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Senior Member
    Join Date
    Jul 2002
    Location
    Paris (France)
    Posts
    182
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Getting HtmlText that is null?

    I have a detail page that is in a table (2 columns by many rows). Silk isn't seeing the table at all (SilkTest 5.0.2).

    Anyway, the first column is a heading, the second column is the data. Thus, we have something like:
    Now, as long as there is a value present, Silk is happy. However, the value could be null. If that happens, just a non-breaking space is in the second column for that row.

    This is the problem: Silk isn't seeing anything there, so it fails when doing a GetText(). The HtmlHeading before it Silk will see as Prior Text, as long as there is something in the second column. When it is null, it goes by the Index, but then returns the wrong value. So, when getting the value for fax, it will return the value for email. When getting the value for email, an exception occurs since the index no longer exists.


    I am now verifing that the object exists before doing a GetText() in order to prevent an exception, but that didn't solve the problem of getting the wrong value when a null is found.

    Any suggestions?

    I need to test this in both IE and Netscape, so the new DCOM stuff in 5.0.3 may not be a solution.


    ------------------
    David Genrich
    Icarian
    555 North Mathilda Ave
    Sunnyvale, CA 94086
    davidg@icarian.com

  2. #2
    Member
    Join Date
    Jun 2000
    Posts
    50
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Getting HtmlText that is null?

    Hey David

    I was experiencing the same problem, which I solved by switching to 5.0.3 and the IE DOM extension. DOM would solve your trouble since SilkTest will no longer rely on what it sees to record a test frame but will actually ask the browser. I suppose Segue are working on a DOM extension for Netscape 6.0 (which should be released soon), so your troubles will be definitely be cured by then.

    Also, what might be happening is that you don't have the minimum amount of rows and columns for proper table recognition. Is your table borderless ?

    In the meantime, one solution which is (I admit) kind of awkward, is to force whoever puts the data into that Table you're testing to use a placeholder, such as a space.

    In any case 5.0.3 and 5.0.3.1 are strongly recommended.

    Cheers,
    Nir.

  3. #3
    Senior Member
    Join Date
    Jul 2002
    Location
    Paris (France)
    Posts
    182
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Getting HtmlText that is null?

    As far as the layout, yes, it is a hidden table. I know that often rows aren't defined correctly (some rows have 3 columns, some have 2, others have 3). Browsers handle that find, but Silk doesn't. I also know that if there is a empty cell, it is better to put a non-breaking space in it.

    So, both of these things I have as part of the development stylesheet.

    But, a blank is still a blank. Why I needed to test it with netscape (4.6/4.7) is because a lot of JavaScript is being used with is diffrent between IE and Netscape. So, the tests need to be ran twice.

    I did just get SilkTest 5.0.3.1 and ran my framework test and the actual test I am currently writting. Everything runs Ok (in VO mode). I am just now looking into using DOM mode. Recorded the declaration and noticed it didn't see the cells that were blank either. I think I need to play around with the Borderless table feature.


    ------------------
    David Genrich
    Icarian
    555 North Mathilda Ave
    Sunnyvale, CA 94086
    davidg@icarian.com

  4. #4
    Member
    Join Date
    Jun 2000
    Posts
    50
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Getting HtmlText that is null?

    You're right. I forgot that a blank is not regarded as HtmlText either. What I had to do was place "empty" in the data then write a procedure to remove the "empty" from my datatype and replace it with "".

    DOM should definitely recognize your table properly without you having to fiddle with the ShowBorderlessTables option (assuming there is nothing special about that table). Btw, read the 5.0.3 and .1 release notes - they explain when to use that option. Remember that once you set it to something other than its original value (.5), most of your old recorded test frames will be unusable. Generall I found it's better to leave that option unless your tables are really funky.

    If you're still having problems recording this table properly using DOM, put a copy of that page somewhere online and I'll be happy to check it out.

    Cheers,
    Nir.

  5. #5
    Senior Member
    Join Date
    Jul 2002
    Location
    Paris (France)
    Posts
    182
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Getting HtmlText that is null?

    Well, I resolved this by going to SilkTest 5.0.3.1 and using DOM. Not really what I wanted to do, but it will work. Since the page has no JavaScript, and I am using DOM only for that page, I can structure the tests so that both browsers do testing on the form, but only IE browsers verify the submited page.


    ------------------
    David Genrich
    Icarian
    555 North Mathilda Ave
    Sunnyvale, CA 94086
    davidg@icarian.com

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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 10:47 AM.

Copyright BetaSoft Inc.