We all know that the .tsr file stores the information of the object repository, and We can load the file to an ObjectRepositoryUtil Object in VBS, then we can do a lot through this object.
But how can I capture all the widgets in a window and stores into the .tsr file using VBS?
I mean when we do the following in the QTP GUI:
Resources->Object Repository Manager->Object->Add Object->
"CLICK THE WINDOW WE WANT TO CAPTURE"->File->Save
we actually get the .tsr file of the window and all its components we want to capture.
But how can I do this in VBS, does it have any API?
I look up the document called ObjectRepositoryUtil and find the method GetAllObjects, but it is just not the same thing.
Could anyone solve my problem ? I would really appreciate it.
Thank you.
I'm not sure why you want to automate creating an object repository. Usually object repositories are created once and then used for creating tests.
Are you familiar with QTP's Navigate and Learn feature, it allows adding all objects from an application while interacting with the application.
If you are looking for a tool or code that can actually mimic the object capturing capability of QTP, outside of QTP - then no such tool/code is available as of now. However code can be written to retrieve the object properties of an application and that I assume you are aware of.
Related
Are is possible to dynamically change About dialog text in RCP based application? I want to replace aboutText value when About dialog opens by dynamically changing some part of it's text. Problem is that I has a client/server application, where information about client can be static, but server information (at least version string) may change independently and I don't know when it will happen. aboutText itself is static text. about.mapping approach also not work, because this file is packed into application JAR and because of this is read-only too. Are there is a possibility to subclass aboutText or update it in another way before About dialog show it? I not want to rewrite the all Eclipse About dialog class from scratch.
You can use system properties in about.mappings to achieve this:
Create an about.mappings file at the root of your app plugin
Add lines such as 0=$net.dnorth.about.text$
Reference {0} in the aboutText set in plugin.properties
Now call System.setProperty("net.dnorth.about.text", "your dynamic text here") in some code at start-up.
Reference: https://bugs.eclipse.org/bugs/show_bug.cgi?id=172692
The about text of the IDE is instance specific i.e if you are running a RCP application then at that time you cant change the About text.It is only possible if you update your RCP with via Check for updates link or if you install another IDE over the present one.
I these two cases only you can change your about text.
I am trying to create custom document windows in VS isolated shell. What I hope to have is something similar to a ToolWindowPane where I can extend it for my custom tool windows and set the content to my custom user control. However, I am not sure if this is possible for VS document windows. I could not find any examples on how to extend the superclass WindowPane in order to create custom document windows that can be repeatedly created dynamically.
Any pointers or suggestions are greatly appreciated!
Edit: Or is there a way to prevent tool windows from restoring to its previous state on VS start? I basically want all of the tool windows to act like document windows and reset/delete themselves on close.
Edit2: Solved previous edit. Set transient flag to true, which prevents tool window from opening on IDE start.
Found work around here:
http://social.msdn.microsoft.com/forums/en/vsx/thread/d60f8cef-2523-4b53-8f24-92eb90912e7c/
However, if anyone has solution on how to create a custom document pane, that'd be great. ToolWindowPane has several drawbacks that I would rather avoid.
The thing is, I created a file with custom information and a unique extension, let's say (.qwas). If I modified the Registry in HKEY_CLASSES_ROOT I can change its icon and choose which program will open it. What I want to do, is that when I double click it, it opens my .NET app and in the app have an event like FileOpenApp. So I can extract information from the file and do custom methods.
The kind of behavior I want to make is similar to the project files of an aplication, like the .fla of flash.
I don't know how to start with this idea, I hope anyone knows even the name of this type of procedure.
Thanks
Can't you pass the name of the file as an argument to your .Net App. Something like
[HKEY_CLASSES_ROOT\Applications[name of APP]\shell\open\command]
#="\"[path to app]\" \"%1\" %*"
I wanted to have a GUI front-end for a script that accepts numerous command-line options, most of them are UNIX paths. So I thought rather than typing them in (even with auto-completion) every time, I'd create a GUI front end which contains text boxes with buttons beside them, which when clicked will invoke the file browser dialogue. Later, I thought I'd extend this to other scripts which would sure require a different set of GUI elements. This made me think if there's any existing app that would let me create a GUI dialog, after parsing some kind of description of the items that I want that window should contain.
I know of programs like Zenity, but I think it's doesn't give me what I want. For example, if I were to use it for the first script, it'll end up flashing sequence of windows in succession rather than getting everything done from a single window.
So, basically I'm looking at some corss-platform program that lets me create a window from a text description, probably XML or the like. Please suggest.
Thanks
Jeenu
Mozilla's XUL is a cross platform application framework - . You could write an app as a Firefox plugin or a standalone XUL application.
mono and monodevelop could work for this. Or even something super simple like shoes.
I want to programmatically create NIB (or XIB) resource files - like resource import tool. Making XIB file manually is not impossible, it is XML-based file, but there are too many unspecified items.
So, I'd like to use AppleScript to drive IB itself and create the resources with it, but I fail to do so - I can't create any new items and it keeps reporting that it cannot add this object to that container. Does anybody have any experience with that, or some good example that I can use as a starting point?
Thanks.
I don't think Interface Builder is scriptable, but perhaps you could have an script which writes a file with the generic IBFile contents and then just change around some vars.