fbpx

Adding Strings Within a String

Adding Strings Within a String

Home Forumlar Ask Expert Suggestion Box Adding Strings Within a String

  • Bu konu 5 yanıt içerir, 2 izleyen vardır ve en son 4 ay önce Sasha ZAP tarafından güncellenmiştir.
6 yazı görüntüleniyor - 1 ile 6 arası (toplam 6)
  • Yazar
    Yazılar
  • #74686
    Antonia Alleyne
    Katı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.

      #74688
      Sasha ZAP
      Moderatör

        Hello 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.
        #74691
        Sasha ZAP
        Moderatör

          Hello
          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=sharing

          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.
          • 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.
          #75292
          Antonia Alleyne
          Katı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.
            #75294
            Antonia Alleyne
            Katı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.

              #75332
              Sasha ZAP
              Moderatör

                Hello 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=sharing

                2. 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=sharing

                P.S. In Test Settings you can set ZAPTEST’s Script Language:
                https://drive.google.com/file/d/1U1OoqHqUj_cJSuygf5WBpLKNZjDC3Ji9/view?usp=sharing

                Hope this helps,
                Thanks,
                ZAPTEST Team

              6 yazı görüntüleniyor - 1 ile 6 arası (toplam 6)
              • Bu konuyu yanıtlamak için giriş yapmış olmalısınız.