SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 9 of 9
  1. #1
    Senior Member
    Join Date
    Jan 2003
    Location
    Portland, ME USA
    Posts
    603
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Sheridan Grid and Typekeys?

    I am trying to use the typekeys method to simulate how a user would enter information. When I use the setItem method it just forces the info onto the cell,( which is ok in most cases) but i have quite a few cases where the cell only takes a certain number of chacters, and I though if i use a Grid.TypeKeys (); that it would enter it onto the grid as a user would, problem is they I use this method, nothing get's typed into the cell. I have also tried wrapping the statement in like this.
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">withoptions
    {
    // Tell the AGENT we are in play mode...
    BindAgentOption(OPT_PLAY_MODE, &quot;Win32&quot;

    // Type in the value...
    //this.TypeKeys (sValue);

    // Set the value of the cell in question...
    this._SetItemProp (&quot;Columns&quot;, iColumn, &quot;&quot;, &quot;Text&quot;, sValue); // NOTE: This will probably throw an exception if
    // the data types don't match!
    } </pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">Now if i use the _SetItemProp method If puts the information in, but it's not accounting for the amount of chacters that can be put into the cell, and the AUT dies.

    Does anyone have any suggestion's or have you seen this type of behavior?

    Thanks in advance,
    N+ CNA

  2. #2
    Super Member
    Join Date
    Jul 2001
    Location
    Earth
    Posts
    1,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Sheridan Grid and Typekeys?

    Yes...The developer was not counting on someone entering text into a field by a means other than the keyboard or the mouse. Using this method is bypassing those input methods. Their error checking was probably looking for key or mouse events, not using the Grid's API directly.

    You could log a bug for it, but the developer would probably just respond by saying that since a regular user of the app won't do that, they are not going to fix it.

    I personally wouldn't use that method to input text into the grid. If your automated script don't behave the same way that a user would, you aren't testing the app like a real user and will likely have bugs creep up on you.

    IMHO- Unless your job is to test the API, a tool needs to use the mouse and/or the keyboard to create actions. Stick with TypeKeys.

  3. #3
    Senior Member
    Join Date
    Jan 2003
    Location
    Portland, ME USA
    Posts
    603
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Sheridan Grid and Typekeys?

    That is exaclly what I am trying to do, but when I use typekeys it does not put anything into the cell. My question is since typekeys is not working how would I simulate it so it act's like a user?

    Thanks in advance,
    N+ CNA

  4. #4
    Super Member
    Join Date
    Jul 2001
    Location
    Earth
    Posts
    1,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Sheridan Grid and Typekeys?

    Is it a case where the cell needs to be set active first (i.e. clicked in) before the user can type text into it? It might be that the TypeKeys is sending the keys into the grid, but if the cell hasn't been set active first, the keys might be ignored.

  5. #5
    Senior Member
    Join Date
    Aug 2003
    Location
    NY
    Posts
    708
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Sheridan Grid and Typekeys?

    Yes, TypeKeys directly to a grid without a cell being active are usually ignored. We had to use locations - (relative to the Grid) to click on such cells.

    Thanks and Regards,
    Harshil

  6. #6
    Senior Member
    Join Date
    Jan 2003
    Location
    Portland, ME USA
    Posts
    603
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Sheridan Grid and Typekeys?

    How do you get the cell's location to click into, w/o hardcoding cell location's? The grid i am using, each column can be relocated, so is there a way to determine the cell's location on the grid?

    Thanks in advance.
    N+ CNA

  7. #7
    Senior Member
    Join Date
    Jan 2003
    Location
    Portland, ME USA
    Posts
    603
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Sheridan Grid and Typekeys?

    Ok I calculate a tab routine that will take to any cell in the grid, with focus to that cell. And when I do a typekeys is still doesn't type anything into the cell. Now I can replicate this manually, navigate to the cell in question, and then type into that cell, w/o using the mouse. So is there any reason why it't now working in the script when I am doing it exaclly like the user, or so i think???


    Thanks in advance.
    N+ CNA

  8. #8
    Super Member
    Join Date
    Jul 2001
    Location
    Earth
    Posts
    1,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Sheridan Grid and Typekeys?

    The grid may have a method available to it to return which cell is active, or to return the RECT of a grid cell. You could use this information to first click in the grid to activate a particular cell or to use the arrow keys to navigate to the cell you need active.

  9. #9
    Senior Member
    Join Date
    Aug 2003
    Location
    NY
    Posts
    708
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Sheridan Grid and Typekeys?

    Oops, sorry: forgot to mention. The cell is seen as a textfield when the cursor is in the cell. We typekeys to that TextField. Check out the declaration for the cell in your case when the cursor is inside it.

    Thanks and Regards,
    Harshil

 

 

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 08:04 PM.

Copyright BetaSoft Inc.