Forum Discussion

suresh_1's avatar
suresh_1
Occasional Contributor
13 years ago

Data Selector

Response is

                {script:"window.location=\"/Planning/CorePlanning/Edit/14272\";"}



           I want to keep  14272  as variable



       please provide Regular Expression for this

8 Replies

  • AlexeyKryuchkov's avatar
    AlexeyKryuchkov
    SmartBear Alumni (Retired)
    Hi suresh,



    The simplest expression for this case is:



    /Planning/CorePlanning/Edit/(\d*)


    To obtain the value, use the $1 mask.



    Also, I recommend that you try creating regular expressions with the help of the "Regular Expressions Syntax" help topic.



    BTW, personally, I use the TRegExpr tool to develop regular expressions.
  • suresh_1's avatar
    suresh_1
    Occasional Contributor

         Request
    9      
                                   
                   Response


                
      
                   
                                            {script:"window.location=\"/Planning/CorePlanning/Edit/14373\";"}


     


    Sub Sequent Request is


         Request 10
                                                     GET
    /Planning/CorePlanning/Edit/14373  HTTP/1.1


     


             Regular
    Expression:- 
    \s*\{script:"window\.location=\\"\/Planning\/CorePlanning\/Edit\/(.*?)\\";"}


             Sub
    Expression        :-  $1


          
                Can you
    confirm whether I am using Regular Expression and the Sub Expression Correctly,
    Since when I test the request is completed with warning messages.


            


            Captured
    Request:-  GET /Planning/CorePlanning/Edit/14373 HTTP/1.1


            Data Correlated
    Request:- GET /Planning/CorePlanning/Edit/@MyVariable HTTP/1.1


          Note:-  @MyVariable
    consists of value extracted using Regular Expression above from the Response.


     


             Please confirm
    is this warnings are due to Regular Expression or Formation of Data Correlation
    in Request 10.


     

  • AlexeyKryuchkov's avatar
    AlexeyKryuchkov
    SmartBear Alumni (Retired)
    Hi Suresh,



    The regular expression seems to be correct. As for the warnings, I cannot say for sure whether the traffic was correlated correctly. Reproduce the problem, pack the folder containing your test project and post the archive - I'll look into it. Please note that you can submit a separate support case using our Contact Support form.
  • suresh_1's avatar
    suresh_1
    Occasional Contributor
    Hi I have zipped my project and sent to support team  and clearly explained what i am going to do, after sending that mail i have not received any confirmation mail and aslo  how can I, now when the issue is solved. where can i see that issues is posted or not.



    Please guide me  
  • AlexeyKryuchkov's avatar
    AlexeyKryuchkov
    SmartBear Alumni (Retired)
    Hi Suresh,



    I've already sent a reply within that support case - please check your inbox.
  • suresh_1's avatar
    suresh_1
    Occasional Contributor
    Thanks Mike,

             Regarding [Issue# M0095424]

                     Support Team Mail to me :-

                                  LoadComplete doesn't support parameterizing URL in such a way. I have registered a suggestion to implement support for such parameters in our DB.



                    Most of the Url in MVC are like that one I have give to you , and if you say Load Complete 2 won't Support MVC, is there a way we can get a hot fix for this.

     

         please do the needful.




  • AlexeyKryuchkov's avatar
    AlexeyKryuchkov
    SmartBear Alumni (Retired)
    Hi Suresh,



    The functionality has not been implemented yet and I cannot say for sure when and whether it will be implemented.
  • Anonymous's avatar
    Anonymous
    This issue and a couple of related ones are in a high priority queue to be addressed in a patch for LoadComplete 2.1.

    What is being enhanced is the ability to use variables in a request URL as means of parameterization.

    Please stay tuned for updates next week.