Adding Strings Within a String
Home › Forumlar › Ask Expert › Suggestion Box › Adding Strings Within a String
Etiket: using double quotes
- Bu konu 5 yanıt içerir, 2 izleyen vardır ve en son 4 ay önce Sasha ZAP tarafından güncellenmiştir.
-
YazarYazılar
-
Ocak 5, 2024: 8:18 pm #74686Antonia AlleyneKatılımcı
I want to be able to have ZapTest type out “” but I am not sure how to do that. I tried using escaped characters, but that does not as well. I am using JavaScript. I attached a screenshot of what I am attempted to do. Any help would be greatly appreciated.
Ocak 5, 2024: 9:11 pm #74688Sasha ZAPModeratörHello Antonia Alleyne,
As I understood you wish the string “Long Axis” will appear with quotes, if this is correct then the answer is:
Application(“Expert Window”).View(“Dev Console”).Object(“Enter command”).Type(“sensor.probe-override-window-name “Long Axis”test “);
Thanks,
ZAPTEST Team- Bu yanıt 4 ay 2 hafta önce önce Sasha ZAP tarafından değiştirildi.
- Bu yanıt 4 ay 2 hafta önce önce Sasha ZAP tarafından değiştirildi.
Ocak 5, 2024: 9:17 pm #74691Sasha ZAPModeratörHello
I see the code cannot be saved in the Forum as in ZAPTEST, so I’ve attached it as a screenshot.P.S. If you cannot open the attached screenshot please use this URL to view it:
https://drive.google.com/file/d/1qp95HvRkr88lZzYKgPFDm3MK0LX368Ib/view?usp=sharingThanks,
ZAPTEST Team- Bu yanıt 4 ay 2 hafta önce önce Sasha ZAP tarafından değiştirildi.
- Bu yanıt 4 ay 2 hafta önce önce Sasha ZAP tarafından değiştirildi.
- Bu yanıt 4 ay 2 hafta önce önce Sasha ZAP tarafından değiştirildi.
Attachments:
You must be logged in to view attached files.Ocak 15, 2024: 8:34 pm #75292Antonia AlleyneKatılımcıHello Sasha, My apologies for the delay. I didn’t realize that I needed to log in in order to see the messages.
However, I tried the command that you mentioned above
Application(“Expert Window”).View(“Dev Console”).Object(“Enter command”).Type(“sensor.probe-override-window-name “Long Axis”test “);
and that did not work.I was able to get it to type by using the command
Application(“Expert Window”).View(“Dev Console”).Object(“Enter command”).Type(“sensor.probe-override-window-name “Long Axis” “);
but I need the quotes to be specific in order for me to use what it types.If I switch the quotes to the command below, then it does not work.
Application(“Expert Window”).View(“Dev Console”).Object(“Enter command”).Type(“sensor.probe-override-window-name “Long Axis” ”);Does that mean that the outer quotes must always be “” and the inner “”
Also attached screenshot below
Attachments:
You must be logged in to view attached files.Ocak 15, 2024: 9:17 pm #75294Antonia AlleyneKatılımcıdidn’t realize that the quotes would look the same once I submitted, but the image is reflective of the two different quote types.
Ocak 17, 2024: 12:44 am #75332Sasha ZAPModeratörHello Antonia,
Basically there are 2 ways to type a string inside quotes:
1. If you are setting ZAPTEST scripting language to JavaScript then you should use this format of text:
https://drive.google.com/file/d/1KBCfkTI4k0UvTmA3nfSZbj5TMsOw2cfU/view?usp=sharing2. If you are setting ZAPTEST scripting language to VBScript then you should use this format of text:
https://drive.google.com/file/d/19V9XFpYqWf8MNF9LkqueNJ7jyD2XRUVj/view?usp=sharingP.S. In Test Settings you can set ZAPTEST’s Script Language:
https://drive.google.com/file/d/1U1OoqHqUj_cJSuygf5WBpLKNZjDC3Ji9/view?usp=sharingHope this helps,
Thanks,
ZAPTEST Team -
YazarYazılar
- Bu konuyu yanıtlamak için giriş yapmış olmalısınız.