ask command question?

Tazman09 wrote:
I have a question on a command to add a password to a script and not show what the password is in the script. The following is the script I'm developing

click "password"
ask password "password"
typetext "xxxxxxx" , Enter

The last line for some reason I need to include to make it work, however it defeats the ask command.

I tried using the following command to hind the password in the script. TypeUnLogged It

didn't work. I'm using the beta version of the Linux SW.


Comments

  • Hello Taz--

    You will want to use the scriptlogging property.
    Examples:
    Set the ScriptLogging to Silent 
    SetOption Scriptlogging, On
    
    Values: on , off minimal, or silent. It defauls to On.
    Here's a description of the different values for the property:
    On: Log, LogWarning, and LogError commands, and all interactions with the SUT are recorded.
    Off: Only Log, LogWarning, and LogError commands are recorded.
    Minimal: Only LogWarning and LogError commands are recorded.
    Silent: Nothing is recorded in the Log file.

    So, for your example, you may want to do something like this:
    set scriptLogger to the scriptLogging --save the old setting to revert to later
    set the scroptLogging to silent
    click "password"
    ask password
    typetext it, Enter
    set the scriptLogging to scriptLogger
    
    There's a bunch more information on the script results log in Chapter 7 of the Eggplant Reference.

    I hope this helps. Don't hesitate to ask more questions.

    Allen
  • Tazman09 wrote:
    Thanks Allen!
  • Allen,

    Please disregard the previous request. I had the log statement before I turned logging back on. Duh.

    Thanks

    Mark
    Hi Allen

    I was wondering, after turning logging off, entering the password, and then turning the logging back on, can a log entry be made to indicated that a password was indeed entered? I tried
    Log "Password was entered"
    

    but that did not enter anything into the log area of the run window.

    Thanks

    Mark

    So, for your example, you may want to do something like this:
    set scriptLogger to the scriptLogging --save the old setting to revert to later
    set the scriptLogging to silent
    click "password"
    ask password
    typetext it, Enter
    set the scriptLogging to scriptLogger
    

    There's a bunch more information on the script results log in Chapter 7 of the Eggplant Reference.

    I hope this helps. Don't hesitate to ask more questions.
Sign In or Register to comment.