Automating IBM RTC with UFT - hp-uft

we are creating tasks and linking them with parents in IBM RTC. we automated this process through RTC. There is a drop down arrow from which we select an option to set the parent.
The problem is the script clicking drop down arrow correctly for first 2 times in a loop and the 3rd time it is unable to identify the arrow.
Please suggest a solution for this.

Related

Need to re-record part of OpenScript script but don't want to re-record the whole script

We would like to fix a portion of a script in OpenScript by re-recording the part that's not working in lieu of re-recording the whole script. We can't seem to figure out how to do it. Every time we try, Open Script starts with the log in to the testing program. It seems you should be able to start recording at any point. Does anyone know?
create a test script, click on Record, once it launches, in Openscript toolbar pause the recording. Now the recording is stopped, whatever we do will not be recorded .Manually perform the sections which you don't want to record. Then click on resume on the openscript toolbar. Now it will be recorded.
Once done, copy the generated code to the actual script.
[If you are using object library add this as an asset in actual script]
Hope this helps !
Recording from opened browser is supported in Oracle Application testing suite .
1. Open OATS Tool
2. Launch IE
3. navigate to UI where you want to start recording
4. There is Globe icon top (menu Icons), select opened browser
5. Select record
6. Steps will be recorded in Editor
Image:
For more OATS related tips, visit here www.testinghive.com

How to save current windows state using Delphi and JEDI Docking?

I'm using Delphi 6 and JEDI Docking visual components. I realise drag and drop between windows of my propgramm. I need to save current state of windows. For example, in first run I have separate one server window and two client windows, then I remove client windows into server window using DragandDrop. Then I close my programm and in second run I expect to see last state of windows (two client windows inside server window). How to realize this?
I have found solution. There are two methods for saving and loading windows state in JvDockControlForm module.
SaveDockTreeToFile('MyFile');
LoadDockTreeFromFile('MyFile');
Also there are another ways to save state by components in JvPersistence tab.
Anyway you need to put JvDockServer component from Jv Docking tab to your main form to use these methods above.

Script to emulate physical keyboard press so that PC stays awake

I'm looking for a solution to an issue caused by an active directory policy. I use a development desktop PC however that sits under my desk in the office. That PC has a policy on it that puts it to sleep if no keyboard / mouse activity is detected for 4 hours. This is common in my case as I use remote desktop to connect to the machine rather than physically sitting at it.
I've done the logical thing and spoken to IT about getting the PC put into a differnt OU with the policy removed but they haven't acted on this yet and it is really causing me issues. (Easy if you are in the office but a pain if you are working from home!)
So I wondered if there was a simple script I could run that would press the caps lock key twice every 3 hours - but in a way that would be seen by the PC as a physical key press rather than just a script running.
Alternatively I could look into making a usb thumdrive that acts as a keyboard but I think I'd run into security issues there!
Regards
The link of where this information was extracted
The Send Keys method simulates real key strokes.
Here's an example from the same website.
Sub CommentAddOrEdit()
Dim cmt As Comment
Set cmt = ActiveCell.Comment
If cmt Is Nothing Then
ActiveCell.AddComment text:=""
End If
SendKeys "+{F2}"
End Sub
Also it comes with a nice table that translates every key in your keyboard, for the caps lock as you wanted it would be :
{CAPSLOCK}.
I have just found something ready to use:
http://www.symantec.com/connect/downloads/readynosleepexe-prevents-screensaver-and-pc-locking
It does not exactly do what you are asking for, but helps to solve your initial problem.
It moves your cursor side to side by a couple of pixels.
Following the link you could find a zip with .exe and source file in it.
The source file can be changed ( for example, to change the timeout ) and recompiled by this tool:
https://www.autoitscript.com/autoit3/docs/intro/compiler.htm
This .exe has an icon in the tray to provide a way to stop it ( or you can just kill the process from the process manager ). it also needs less than 1 MB of RAM.

Handle GUI window changes

I'm doing an automation script for installation wizards using AutoIt. I'm trying to handle window changes in some way.
Can some one explain how these GUI's work?
When I click on the Next button it looks just like the components in the GUI is beeing changed. Is this tha case? Or is a new window created and the old destroyed?
I've noticed that the process ID is the same for all windows.
I'm sure there is some way to know which "state" the GUI is in, or which step?
By the way. All the windows has the same title.
Thanks
/Anders
This will be dependant on the program you are automating.
The easiest approach would be to look at what changes in the GUI between stages, likely candidates are if there is a label that is giving instructions for that step, or a button that has text changing (e.g. if the button says "Finish" then you know your at the end).
Most installer programs have child windows for grouping the controls of each stage. These are typically implemented as dialog resources (as can be seen when using something like reshacker on them). So although the window remains the same, the panels are being created/destroyed as appropriate. This is a very neat method of doing it, for the obvious reason that you don't need to have to code to create/destroy a lot of controls. Resource created dialogs don't have nice class names like windows sometimes do though, so this may not be a reliable way to check the state.

Application started by user or another application?

This is a very general question:
I was wondering whether it is possible to find out whether an application (any kind of application no matter if it a delphi-application or java or whatever) was started by a user or by another application? And if it is possible and I see that an application was called by another one, can I find out what the "father" application is, that called the new programm?
Thnx in advance!
EDIT: Maybe it is too general - How can I see whether a Delphi application has a parent application with Delphi itself, e.g. one application was started by a service and I need to find that service?
Every single running application has a parent application, which launched it (except for root system process).
It is not possible to tell, whenever it is user who directly clicked on application to lauch it or not.
Example: take Explorer shell (not Internet Explorer).
You can double click on any application to launch it. The parent process will be explorer.exe.
You can right-click on any file and a bunch of context menu extenders will load. Some of them may launch external applications to, say, create a preview of video-file (I saw this, swear!). The parent process will be explorer.exe, but user didn't indended to lauch any application. He just wants to view file's properties. He didn't even know, that applications were lauched!
Example: take Total Commander or any other two-panel file managers, which supports plugins for archives.
You can double click on any
application to launch it. The parent
process will be totalcmd.exe.
You may enter archive file and copy
(extract) few files from it to your
Documents folders. Corresponding
plugin may handle extraction by
itself or run invisible process to
handle all work. All you see is
progress bar in Total Commander. But
there is a new proces and its parent
is totalcmd.exe again.
There are no differences between cases 1 and 2 in both examples.
BTW, the definition "started by user" is unclear. You even may say that nothing can happen without user's command. All those background processes in cases #2 were launched because user asked for it. Well, user didn't asked for lauch explicitly, but he asked for operation itself.
You don't mention if you want to do this programmatically or if you're looking for a tool to just show the information.
If you just want to view the information, you can use Process Monitor, part of SysInternals:
http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx
In the Tools menu, there is a 'Process Tree' view that shows you a tree with parent / child process relationships and as well as the owner of each process.
If you want even more detail about processes, look at Process Explorer:
http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
if it started by the user from windows so the parent will be explorer.exe, otherwise the parent will be the application which run the process.
to check the parent of a process by using tool check Ander Miller reply.
Did you see this question?
I'm not sure that I see problem right now.

Resources