SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Sep 2007
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Problem testing DevExpress controls

    Hello,

    I am currently evaluating TestComplete for use with a C# application. I am using Test Complete Version 5.14.538.3 with the tcClrOpenApp.pls extension installed.

    Everything is fine but I have problems testing DevExpress controls XtraGrid and XtraVerticalGrid.

    Even though I can trace them down to the actual component using the object browser when I record the script actions on those controls are recorded as mouse clicks. I tried to edit the script manually but with no result.

    This is an example of what I am adding in the script:
    w3["BackColor"]["Azure"];
    OR
    w3 ["SetCellValue"](w3["Rows"]("1"), 0,"Jim");

    where w3 is the XtraVerticalGrid control:
    w3 = w2["panel2"]["panel1"]["middlePanel"]["BenefitScaleGeneralGrid"]["WinFormsObject"]("vGridControl1");

    Is the syntax wrong or am I missing something bigger?
    Is it impossible to record actions on those controls automatically?

    Thanks very much for your help.

    Alex

  2. #2
    Senior Member
    Join Date
    Aug 2006
    Posts
    1,920
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Problem testing DevExpress controls

    Hello Alexandros,

    [ QUOTE ]

    Is the syntax wrong or am I missing something bigger?


    [/ QUOTE ]
    It looks like native methods and properties of the control are used improperly. Please let me know what task you want to accomplish, and I will try to create a sample script demonstrating how you can do this.

    [ QUOTE ]

    Is it impossible to record actions on those controls automatically?


    [/ QUOTE ]
    TestComplete 5.14 does not have special support for the XtraGrid and XtraVerticalGrid controls. Therefore, all the actions with these controls are recorded as coordinate clicks and dragging. However, the new major version of the product (TestComplete 6), which was released last week, includes advanced support for the XtraGrid grid control. I recommend that you download the free trial version of TestComplete 6 from our web site and evaluate the feature:

    http://www.automatedqa.com/downloads...lete/index.asp
    Jared - AQA Support

  3. #3
    Junior Member
    Join Date
    Sep 2007
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Problem testing DevExpress controls

    Jared,

    Thank you very much for your answer.
    I will give TestComplete 6 a go!

    A task would be to fill a cell in. A sample script would be great.

    Thanks,
    Alex

  4. #4
    Senior Member
    Join Date
    Aug 2006
    Posts
    1,920
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Problem testing DevExpress controls

    Hi Alex,

    To set a cell value, you can use the SetCellValue method. However, the way you use the method depends on the way in which rows are organized. If rows have several levels of hierarchy, you need to use the ChildRows property to obtain the needed row.

    For example, the script below modifies cell values in the "First Name" row of the grid located on the "Category Row Buttons" page of the VertGridTutorials.exe sample application (it is located in the "<\Developer Express .NET v7.1>\Demos\XtraVerticalGrid\Bin\" folder).

    <font class="small">Code:</font><hr /><pre>
    // C#Script
    function XtraVerticalGridSample()
    {
    var p, GridObj;
    p = Sys["Process"]("VertGridTutorials");

    // Switches to the "Category Row Buttons" page
    p["frmMain"]["WinFormsObject"]("gcNavigations")["listBoxControl1"]["Click"](63, 7);

    GridObj = p["WinFormsObject"]("frmMain")["WinFormsObject"]("pcMain")
    ["WinFormsObject"]("gcContainer")["WinFormsObject"]("CategoryRowButtons")
    ["WinFormsObject"]("vGridControl1")

    // Posts the values of items of the "First Name" row to the log
    var res = GridObj["Rows"]["Item"](0)["ChildRows"]["Item"](0)["Properties"]["Caption"] + ": ";
    for(var j = 0; j &lt; 5; j++) {
    res += GridObj["GetCellValue"](
    GridObj["Rows"]["Item"](0)["ChildRows"]["Item"](0), j)["ToString"]() + "|";
    }
    Log["Message"](res);

    // Changes the values of items of the "First Name" row
    for(var j = 0; j &lt; 5; j++) {
    GridObj["SetCellValue"](
    GridObj["Rows"]["Item"](0)["ChildRows"]["Item"](0), j, "Test" + j);
    }

    // Posts the values of items of the "First Name" row to the log
    res = GridObj["Rows"]["Item"](0)["ChildRows"]["Item"](0)["Properties"]["Caption"] + ": ";
    for(var j = 0; j &lt; 5; j++) {
    res += GridObj["GetCellValue"](
    GridObj["Rows"]["Item"](0)["ChildRows"]["Item"](0), j)["ToString"]() + "|";
    }
    Log["Message"](res);
    }
    </pre><hr />

    I hope this helps.
    Jared - AQA Support

  5. #5
    Junior Member
    Join Date
    Sep 2007
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Problem testing DevExpress controls

    Hello,

    Thanks for the sample script was very useful and I got to use the grid by using its properties.

    I also downloaded TestComplete 6.0.191.3. I tried it out but again it seems to be recording screen clicks when I use the XtraGrid. It records clicks to navigate to different cells or to select something from a drop down list on the cell or set a date from a dropdown calendar.

    Do I need to set-up something? What exactly does the “advanced support for the XtraGrid grid control” include?

    Thanks again for the help you have provided so far.
    Cheers,
    Alex

  6. #6
    Junior Member
    Join Date
    Sep 2007
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Problem testing DevExpress controls

    Hello again,

    I checked the help of TestComplete 6 and indeed there are a lot of stuff about the XtraGrid.

    But is it be possible to record actions on the grid rather than input them in the script manually? (i.e. selecting cells, setting cell values etc)

    Cheers,
    Alex

  7. #7
    Senior Member
    Join Date
    Aug 2006
    Posts
    1,920
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Problem testing DevExpress controls

    Hello Alex,

    [ QUOTE ]

    I also downloaded TestComplete 6.0.191.3. I tried it out but again it seems to be recording screen clicks when I use the XtraGrid. It records clicks to navigate to different cells or to select something from a drop down list on the cell or set a date from a dropdown calendar.


    [/ QUOTE ]
    TestComplete 6 records cell selections in the XtraGrid grid control as calls to the ClickCellXY method of the DevExpressXtraGrid object. As for actions with in-place editors of the grid, they are separate controls and the way TestComplete records actions with them depends on their class name. For example, if the in-place editor is represented by the DevExpress DateEditCalendar control, TestComplete will record actions with it as coordinate clicks.

    [ QUOTE ]

    What exactly does the &amp;#8220;advanced support for the XtraGrid grid control&amp;#8221; include?


    [/ QUOTE ]
    TestComplete provides the DevExpressXtraGrid scripting object which is associated with the XtraGrid grid control and can be used to extract data from the grid and to perform actions with it. You can find the list of methods and properties of the object in the "DevExpressXtraGrid Object" help topic. Also, you can find a sample project demonstrating how to use the feature in the "&lt;TestComplete 6&gt;\Samples\Scripts\Grids\DevExpress_XtraGrid\ " folder.
    Jared - AQA 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.54%
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 06:30 AM.

Copyright BetaSoft Inc.