Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic FlowchartX and TestComplete8, not recognized (Read 3871 times)
Nilex
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Oct 22nd, 2010
FlowchartX and TestComplete8, not recognized
Oct 22nd, 2010 at 12:28pm
Print Post  
I am using TestComplete8 to test our application and now the time has come to our embedded ActiveX control FlowChartX.

Since mindfusion isn't supported by TestComplete I can't get further into the controller than finding the area.

Like this:
program.mainform.flowchartXcontrol.

What I want to do is to be able to programatically access the objects inside the control.

TestComplete is able to use the public methods and  properties of controls that it can't access by itself.

Having scanned the help for flowchartX I find nothing I can really use.

What I want to do is to find a certain box so I can click it.

I found the function Boxes that returns a collection of all the boxes in the control. I thought to iterate over them and check their names to identify the correct one but that didn't work.

Like this:

boxes = flowchartcontrol.Boxes();

while ( [more boxes in collection] )
  currentBox = boxes.Item( index );

  if( currentBox.Text == [control I'm looking for] )
    [do stuff]

  index++;
end while

Is there any other way to do it? Any tips? Anything?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: FlowchartX and TestComplete8, not recognized
Reply #1 - Oct 22nd, 2010 at 2:19pm
Print Post  
Finding a box with the specified text looks like this in VB:

Code
Select All
Dim b As box
For Each b In fcx.Boxes
    If b.Text = "..." Then
	  ' do stuff
    End If
Next b 



I don't know anything about TestComplete or its script language unfortunately, and have no idea what the equivalent test script would look like.

Stoyan
  
Back to top
 
IP Logged
 
Nilex
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Oct 22nd, 2010
Re: FlowchartX and TestComplete8, not recognized
Reply #2 - Nov 16th, 2010 at 7:45am
Print Post  
Hello Stoyan and thanks for your answer.

I just had the chance to work with this again.

The scriptlanguage I use i JScript but testcomplete also supports DelphiScript and VBScript.

Your code would work with scripting and in particular JScript aswell I assume?

How would the above code look in JScript?

[removed faulty statement]

EDIT: Actually, I can't mix JScript and VBScript or DelphiScript since they're interpreted differently in TestComplete.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: FlowchartX and TestComplete8, not recognized
Reply #3 - Nov 16th, 2010 at 10:04am
Print Post  
The JavaScript equivalent should look like this:

Code
Select All
for (var b in fcx.Boxes)
{
	if (b.Text == "...")
	{
		// do stuff
	}
} 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint