How are we encrypting in ZAP-fiX?
- This topic has 1 reply, 2 voices, and was last updated 9 years, 8 months ago by
Sasha ZAP.
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.
Hello CurtisDo,
Thank-you for your question.
Basically there is no build-in method in Zap-fix methods’ library which deals with encrypting text, therefore you can consider one of the following 3 possible solutions:
1. Usually text-fields which require encryption can be added as known objects (Not a Zap-fix based objects) to the UFT’s Object Repository, once such was added you can use the UFT’s "SetSecure" method upon it (And all other known UFT encryption manipulations).
2. If an AUT’s objects (AUT = Application Under Test) cannot be recognized by UFT, we are strongly recommend to use our standalone ZAPTEST testing app, in it you have the "TypeEncrypted" method.
3. If you still want to use UFT and the Zap-fix objects you can try implementing VBScript code, such as the following:
‘encrypt.vbs
set x = WScript.CreateObject("WScript.Shell")
txt = inputbox("enter text to be encoded")
msgbox encode(txt)
x.Run "%windir%notepad"
wscript.sleep 1000
x.sendkeys encode(txt)
function encode(s)
For i = 1 To Len(s)
newtxt = Mid(s, i, 1)
newtxt = Chr(Asc(newtxt)+3)
coded = coded & newtxt
Next
encode = coded
End Function
‘decrypt.vbs
set x = WScript.createobject("wscript.shell")
txt = inputbox("enter text to be decoded")
msgbox encode(txt)
x.Run "%windir%notepad"
wscript.sleep 1000
x.sendkeys encode(txt) function encode(s)
For i = 1 To Len(s)
newtxt = Mid(s, i, 1)
newtxt = Chr(Asc(newtxt)-3)
coded = coded & newtxt
Next
encode = coded
End Function
Please contact Zap for further help.
Thanks,
Sasha
Already have an account? Login
Check you SPAM folder if you do not see the email.
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |