SPONSORS:






User Tag List

Results 1 to 10 of 10
  1. #1
    Member
    Join Date
    Jun 2001
    Location
    Berkeley, CA, USA
    Posts
    67
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem with Java calendar object

    I am testing an application with a calendar object that SilkTest initially sees like this:

    [+] HtmlColumn JanuaryFebruaryMarchAprilM
    [ ] tag "January February March April May June July August September October November December 20022001200019991998199719961995199419*"
    [+] HtmlPopupList TbSelMonth
    [ ] tag "#1"
    [+] HtmlPopupList TbSelYear
    [ ] tag "#2"
    [-] HtmlTable CalTable
    [ ] tag "#1"
    [+] HtmlColumn Sun
    [ ] tag "Sun"
    [+] HtmlText N1
    [ ] tag "1"
    [+] HtmlText N8
    [ ] tag "8"
    [+] HtmlText N15
    [ ] tag "15"
    [+] HtmlText N22
    [ ] tag "22"
    [+] HtmlText N29
    [ ] tag "29"
    [+] HtmlColumn Mon
    [ ] tag "Mon"
    [+] HtmlText N2
    [ ] tag "2"
    [+] HtmlText N9
    [ ] tag "9"
    [+] HtmlText N16
    [ ] tag "16"
    [+] HtmlText N23
    [ ] tag "23"
    [+] HtmlText N30
    [ ] tag "30"
    [+] HtmlColumn Tue
    [ ] tag "Tue"
    [+] HtmlText N3
    [ ] tag "3"
    [+] HtmlText N10
    [ ] tag "10"
    [+] HtmlText N17
    [ ] tag "17"
    [+] HtmlText N24
    [ ] tag "24"
    [+] HtmlColumn Wed
    [ ] tag "Wed"
    [+] HtmlText N4
    [ ] tag "4"
    [+] HtmlText N11
    [ ] tag "11"
    [+] HtmlText N18
    [ ] tag "18"
    [+] HtmlText N25
    [ ] tag "25"
    [+] HtmlColumn Thu
    [ ] tag "Thu"
    [+] HtmlText N5
    [ ] tag "5"
    [+] HtmlText N12
    [ ] tag "12"
    [+] HtmlText N19
    [ ] tag "19"
    [+] HtmlText N26
    [ ] tag "26"
    [+] HtmlColumn Fri
    [ ] tag "Fri"
    [+] HtmlText N6
    [ ] tag "6"
    [+] HtmlText N13
    [ ] tag "13"
    [+] HtmlText N20
    [ ] tag "20"
    [+] HtmlText N27
    [ ] tag "27"
    [+] HtmlColumn Sat
    [ ] tag "Sat"
    [+] HtmlText N7
    [ ] tag "7"
    [+] HtmlText N14
    [ ] tag "14"
    [+] HtmlText N21
    [ ] tag "21"
    [+] HtmlText N28
    [ ] tag "28"

    The problem is when I change the month or year SilkTest can not see the column entries any more. The columns are seen, but can only be referenced through their index value.

    There seems to be a Java function I can call to set the day value, but I have no idea how to set up a Java .dll call.

    I considered clicking on the appropriate entry in the grid, but the recorder shows that all the Y values are seen as negative numbers.

    Anyone have an idea how I can work around this?


    ------------------

  2. #2
    Member
    Join Date
    Jul 2002
    Location
    Chennai,TN,India
    Posts
    36
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem with Java calendar object

    Hi,

    It looks like the "Java (Calendar} Object" itself not identified.It identifies as a HtmlObject.

    Read out and Extend the Options related to Java Application and then give a try.



    ------------------
    Babu NM
    Babu NM

  3. #3
    Member
    Join Date
    Jun 2001
    Location
    Berkeley, CA, USA
    Posts
    67
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem with Java calendar object

    I have never done that before. How should I get started?

    When it comes to Java, I don't find the SilkTest help file very clear.

    ------------------


    [This message has been edited by Bruce Cummins (edited 09-11-2002).]

  4. #4
    Junior Member
    Join Date
    Jan 2002
    Location
    bangalore,karnataka,india
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem with Java calendar object

    Hello all,
    I am also having the same problem,

    avi..


    ------------------
    avi..
    avi..

  5. #5
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem with Java calendar object

    Do either of you have an operable internet-accessible example that we can look at?


    John


    ------------------

  6. #6
    Member
    Join Date
    Jun 2001
    Location
    Berkeley, CA, USA
    Posts
    67
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem with Java calendar object

    Unfortunately I don't - but if you like I can set up a WebEx conference and demonstrate the behavior I'm seeing.

    ------------------

  7. #7
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem with Java calendar object

    The HTMLText objects under the Table declaration won't be directly useful without some modification.

    To get the days contained in each week use [Table].GetRowText([row number]).

    To get the entire month use [Table].GetformattedText().

    To click on a particular day would require an algorithm combining a search for the day number (the 5th for example) on a row basis to determine the value of a dynamically created HtmlText tag for the actual location in a specific day of the week column. This approach is necessary because column 'lists' collapse their entries when a cell or cells are empty. An example looking at the August calendar: Wednesday the 7th, would normally be HtmlText #2 in the Wednesday column. However because of the roll-up it would actually be identified as HtmlText #1.

    You could also perform this calculation by parsing the return values of GetformattedText which does retain
    place-holders for empty cells.


    John


    ------------------

  8. #8
    Member
    Join Date
    Jun 2001
    Location
    Berkeley, CA, USA
    Posts
    67
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem with Java calendar object

    Thanks for the reply John.

    I'll try GetFormattedText and let you know the results. It has been returning errors for other tables in our application, but I haven't tried it with the calendar yet.

    Edit:
    I tried GetFormattedText and I get an E_UNDEFINED error. I'm guessing that the function is not working properly in 5.5 SP3. It shows us as UserDefined in the Library Browser.


    ------------------


    [This message has been edited by Bruce Cummins (edited 09-25-2002).]

  9. #9
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem with Java calendar object

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Bruce Cummins:


    I tried GetFormattedText and I get an E_UNDEFINED error. I'm guessing that the function is not working properly in 5.5 SP3. It shows us as UserDefined in the Library Browser.
    <HR></BLOCKQUOTE>

    I'm currently running Silk 5.5.3.0 build 1019 configured as "IE DOM" for Explorer 5.5 and it works just fine.

    As far as the error is concerned, let's take a closer look at your table declaration, test call and error message.

    "User Defined" - Instead of using the library browser look up GetFormattedText in the Help Topics Index. It's a standard method.


    John


    ------------------

  10. #10
    Member
    Join Date
    Jun 2001
    Location
    Berkeley, CA, USA
    Posts
    67
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem with Java calendar object

    Hi John,

    I figured out the problem I was having with GetFormattedText. I'm going to try implementing your solution later today. I'll let you know how it goes.


    Edit:

    I'm happy to report success.

    I used GetFormattedText to get the entire month, then parsed through each line to figure out where the 1st was. I then populated a grid with the structure of the calendar.

    I then searched the grid and got the x,y position of the date I was looking for. I used those values in a formula based off of the RECT of the table to generate coordinates for the Click routine.

    It's messy - but it's working.
    ------------------


    [This message has been edited by Bruce Cummins (edited 09-26-2002).]

 

 

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 02:27 PM.

Copyright BetaSoft Inc.