Forum Discussion

LearningTC's avatar
LearningTC
Occasional Contributor
10 years ago

Assigning Dynamic key to a variable with Pipe symbol

I'm trying to assign a dynamic key in response to a variable ABC thro' DataSelector Wizard which contains pipe symbol.(ex: 1|AbcdE6Fghyu).

It throws an error "Failed to extract any value for the variable ABC".

How can i do this?

 

Thanks in advance...

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    Can you provide more details / screenshots? Are you extracting key value from the response header or body? What regular expression is used? Maybe the content of the response?

     

    I remember that there was a problem that sounded like yours, but not sure at the moment without details...

    • LearningTC's avatar
      LearningTC
      Occasional Contributor

      Can you provide more details / screenshots?

           Please find the attachment Error

       

      Are you extracting key value from the response header or body?

            I'm extracting the key from response body

       

      What regular expression is used?

            Please refer attachment RegEx

       

      Maybe the content of the response?

          This is a part of response contains the key.

      <script type="text/javascript"> Sys.Application.add_load(function() { window.setTimeout(function() { *******.Step2.Initialize({*********"SchedulesDepart":[{"Key":"0|MzYxNjQxMzc5NjY2Njg1MjpTb2NrMQAwAAAAMAAwAAA0MTI3",**********});</script>

       

      Thanks in Advance...

       

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        Sorry for the delayed reply and thank you for the additional details that were useful.

        Unfortunately, I am not sure that I can help and I think that this is the problem that should be reported to Support (via the http://support.smartbear.com/message/?prod=LoadComplete form with a possible reference to this thread).

        I found my project that I was talking about. The actual error was exactly the same as yours, though its reason was slightly different. In my case it was possible that the sought for value is not found and it was quite OK in my case as the obtained value was used in the Validation, so my request is that no error is posted to the log if the sought for value is not found.

        In your case, it is strange that the sought for value is not found.

        I will appreciate if you create a ticket to Support and let us know the result here.

         

        Excuse me for not been able to help...