How to send command key in Process.ini CPM file (e.g: Function keys)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

How to send command key in Process.ini CPM file (e.g: Function keys)

L1 Bithead

Hi,

 

I've created a keymap file with F9 mapped out there and when I try the application manually, it's all fine to press F9, however, when I try to run Process.ini file, I cannot press F9. I've tried several ways, none of them worked. Does anyone know how to get through that?

 

Here are my attempts:

``F9''

<key-F9>

<F9>

"F9"

''F9''

^[[20~

\F9

 

Thanks in advance,

Eduardo

7 REPLIES 7

L4 Transporter

try:

F9=(nocrlf)\033\[20~

 

L1 Bithead

Hi Pete, thanks for replying.

 

I got the following on Expect logs (it kept in the same screen). I quite didn't understand the \r in the end, as I've added (nocrlf) - what makes me think this is causing the error below.

 

send: sending "\[20~\r" to { exp4 } 

 

pattern "*"? yes

 

expect: set expect_out(0,string) " sign-on . . .                                                                                                                                                                                              Press Enter         F3=Exit sign  F9=Change          (C) COPYRIGHT IBM CORP. 1980, 2005.  4A  X           S     001/TProtected      "

 

Protected is displayed when hitting <ENTER> on that screen. Am I missing something for (nocrlf) to work?

 

At least now I didn't get the error below:

 

Message: Failed to send "<command>" to remote machine. Error: missing close-bracket.

 

Thanks in advance

By default, TPC & PMTerminal send a CRLF character at the end of each prompt.

Adding "(nocrlf)" is the standard way to not send the CRLF, no special configuration required as far as I know.

 

L1 Bithead

How to send command keys for PSM Connector (webform) or CPM Web Plugin (.ini) (Example: TAB, ENTER)

Have you tried the following Selenium commands? webElement.sendKeys(Keys.TAB); and webElement.sendKeys(Keys.ENTER);

L7 Applicator

Hi @A R​ 

 

For the PSM Connector using Selenium:

 

  • webelement.send_keys(Keys.ENTER) is a command in Selenium that simulates pressing the Enter key on a web element.
  • webelement.send_keys(Keys.TAB) is a command in Selenium that simulates pressing the Tab key on a web element.

 

For the CPM Plugin using Expect commands:

 

# Send TAB key

send "\t"

 

# Send ENTER key

send "\r"

 

 

Hope this helps !

L1 Bithead

HI @Malcolm Murray​ @Malhar Vora​ ,

 

Thank you for sharing the details. I have tried with both above method but no luck, it's shows error element not found.

 

I am working on CPM WEB PLUGIN

[verify] - Working

[change] - Login working and it's Navigate to - Profile page.

 

After that when i click "Change Password " option from elements not working which is dynamic hyperlink (i.e hyperlink keep on change each time accessing the portal) (I tried with xpath and full xpath also no luck - it's opening another TAB in browser as per debug logs.)

 

Please provide is there any alternative method i can use.

 

  • 1086 Views
  • 7 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!