cancel
Showing results for 
Search instead for 
Did you mean: 

file selection

Contributor

file selection

Here is another question, if you don't mind.

There is a Windows application with a toolbar across that has File  Search  Help.

(see attachment).

 

I want to select something from "File" (but to avoid giving proprietary information I am going to ask about selecting from "Help" which is the same principal).


See the second attached.  I am able to successfully click "File" (and therefore "Help") by using

["SwingObject"]("JMenuBar", "File", 0) or ["SwingObject"]("JMenuBar", "File", 0), but then when I try to use the object spy I can't clicki it without the menu closing again so the sub menus are not there.

Is there some way to keep a menu open, or otherwise determine the value of the field?  And not, selecting preferences will bring yet another menu which I need to access.  (And I am really selecting from file, but we might have confidential information there).

 

(This is Connect and C#)

 

 

Tags (1)
10 REPLIES 10
Community Hero

Re: file selection

Hi,

 

Consider the Point And Fix mode of Object Spy (https://support.smartbear.com/testcomplete/docs/testing-with/exploring-apps/object-spy/about.html).

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Contributor

Re: file selection

Thanks, but the problem is I can't get a more detailed view.  It just gives a larger red frame, and I can't select anything inside, either with the spy or point and click.

Community Hero

Re: file selection

While recording a test fully is not something that is usually recommended up here, using the "record" feature of TestComplete to examine how a component is interacted with or how TestComplete "sees" things is CERTAINLY a good way.

 

So... what do you get in TC when you record clicking on the particular component and menu options?  How does it turn out?  Maybe that will reveal to you how to go about the selecting the menus you want.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Contributor

Re: file selection

I actually did record, and it works in the recording.  But I don't know how to convert the mapped objects into my C# universe that has no mapped objects, as it uses the mapped names.  But I now see the point and click.  You do ctrl-shift-a to select the item.  So that seems to have done it for me.

Community Hero

Re: file selection

I don't know how Connect works... however, based upon some of your previous examples, it seems like you COULD do something like

 

Connect.Aliases.MyApp.MyObject


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Highlighted
Community Manager

Re: file selection

Hi,

 


@bistritapcv wrote:

It just gives a larger red frame, and I can't select anything inside, either with the spy or point and click.


 

This makes me think that you tested application wasn't prepared properly and TestComplete cannot see objects inside the application. Could you please make sure that you added all the required libraries?

https://support.smartbear.com/testcomplete/docs/testing-with/advanced/connected/cs.html

---------
Tanya Gorbunova
SmartBear Community Manager

Join the September Hub-bub to show off, learn and win
Contributor

Re: file selection

It says you need do this:

 

function Test()
{
  var p;  
  p = TestedApps["Items"](0)["Run"]();
  while (p["Exists"])
    aqUtils["Delay"](500);
}

 

only if we aren't using Connect.RunTest().  But we are using Connect.RunTest() so I do not need to do that, correct?

 

Also, for libraries we have these attached (please see attached image).  I masked our company confidential libraries to protect confidentiality. Am I missing something?  It looks like they are all there.

 

 

Contributor

Re: file selection

The image did not attach?  I will try again.

Community Hero

Re: file selection

Hi,

 

Well... Based on your last screenshot:
-- Are you using Connected application with TestComplete or TestLeft?

Note, that Connected applications in TestComplete are depricated in favor of TestLeft.

Initial idea of Connected applications was to create self-tested application. I.e. such application calls its own methods from within its own code (thus having full access to all objects and data structures that can be accessed from code within the application itself) and that uses TestComplete mostly just as a reporting engine (Test Log).

With this in mind, I am not sure that C# code that your application is created with has any access to Java Swing objects and data structures that you'd like to interact with.

So, if you are using TestComplete and unless you need Connected application for some reason, I would recommend to try regular test and check if TestComplete itself can identify and interact with both your C# application and Swing part.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Here?
Join us and watch the welcome video:
Top Kudoed Authors
Join the September Hub-bub to show off, learn and win