Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Create Terminal as object
#1
Not Solved
Hello everyone,

I am very new to UFT,

I did read the thread

https://www.learnqtp.com/forums/Thread-h...eateObject

I am currently is doing automation for MainFrame also Terminal emulation.

now is my question how do I create an object of the Terminal?

Path to exe file
"C:\Program Files (x86)\IBM\Personal Communications\"

this is my atempt below:


Code:
Public Sub CreateTerminal()
    
    
Function Terminal()
    
Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Dim qtTeOptions 'As QuickTest.TeOptions ' Declare the TE Options object variable

Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.SetActiveAddins Array("TeWindow") ' Activate the Terminal Emulator Add-in
qtApp.Launch ' Start UFT
qtApp.Visible = True ' Make the UFT application visible
Set qtTeOptions = qtApp.Options.TE ' Return the TE Options object

' Configure the Terminal Emulator options

' Set global Terminal Emulator options (apply to all emulators)

qtTeOptions.ScreenTitleRow = 1 ' Set the screen title location
qtTeOptions.ScreenTitleCol = 1
qtTeOptions.ScreenTitleLength = 30

qtTeOptions.AutoAdvance = False ' Specifies that the emulator does not support auto-advance fields
qtTeOptions.AutoSyncKeys = "13" ' Record a Sync step each time the Enter key is pressed while recording the test
qtTeOptions.RecordMenusAndPopups = True 'Enable recording of emulator popups and menus
qtTeOptions.RecordCursorPosition = True 'Record cursor position steps
qtTeOptions.UsePropertyPattern = True ' Use default property pattern file
qtTeOptions.PropertyPatternsFile = "C:\Program Files\HPE Software\Unified Functional Testing\Dat\PropertyPatternConfigTE.xml"

' Specify the current emulator
qtTeOptions.CurrentEmulator = "IBM Pcom" ' Set the current emulator as Host On-Demand 8.0

' Set options that are specific to the current emulator
qtTeOptions.Protocol = "autodetect" 'Let UFT detect the session protocol
qtTeOptions.BlankLines = 0 ' No blank lines at the bottom of the emulator window.
qtTeOptions.CodePage = 0 ' Use the default code page conversion
qtTeOptions.HllapiDllName = "C:\Program Files\IBM\EHLLAPI\pcshll32.dll" ' Specify the HLLAPI dll to use
qtTeOptions.HllapiProcName = "hllapi" ' Specify the HLLAPI function to use
qtTeOptions.VerifyHllapiDllPath = True ' Display a warning message if the HLLAPI dll is not found
qtTeOptions.ScreenLabelUseAllChars = True ' Use protected and unprotected fields to identify the screen label.
qtTeOptions.WindowTitlePrefix = "MyTerminal" ' Identify the terminal window based on its window title prefix.
qtTeOptions.TrailingMode = True ' Trim white characters when recording in context-sensitive mode
qtTeOptions.TrailingFieldLength = 5 ' if the field begins with more than five black characters.
qtTeOptions.BeepOnSync = False ' Do not beep after each Sync step.
qtTeOptions.UseKeyEvent "@R", "17;52" ' Replay the TE_RESET key using the CTRL+R keyboard event.
qtTeOptions.SyncTime = 200 ' Wait 200 milliseconds before checking the emulator status

' Clean up
Set qtTeOptions = Nothing ' Release the TE Options object ' Release the Te Options object
Set qtApp = Nothing ' Release the Application object ' Release the Application object



End Function

End Sub


now is my question do I make the object visible also called from another function in another sub function?

Thank you in advance
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  ActiveX component can't create object: 'JavaWindow' JayeshK 0 1,721 01-07-2021, 01:12 PM
Last Post: JayeshK
Exclamation URGENT: ActiveX component can't create object citibank_ani 3 15,539 09-09-2014, 01:02 PM
Last Post: VarunKaushik
  How to create an object for all actions excellentpawan123 1 2,736 06-05-2014, 01:50 PM
Last Post: Jay
  Terminal Emulator qtpirfan701 0 3,724 03-21-2014, 12:20 PM
Last Post: qtpirfan701
Question Outside View Terminal Emulator testing joncfrazier 0 3,377 12-04-2013, 10:47 PM
Last Post: joncfrazier

Forum Jump:


Users browsing this thread: 2 Guest(s)