How to extract random IDs values for elements with jmeter in a jsf web app The 2019 Stack Overflow Developer Survey Results Are InJmeter - weighted random values?faces FormSignature with JMeter?Testing JSF application with JMeter - ViewState issueExtracting ViewState when testing JSF with JMeterUsing Extracted JSON Value in Another JMeter ThreadCapture WebDriver requests in JmeterJmeter - how to get higher randomize effect?File upload request in SharePoint Website using JMeter proxy recording and load test failsSaving form input from JMeter in a JSF appUpload a file with Jmeter in a JSF web application

How can I create a character who can assume the widest possible range of creature sizes?

If the Wish spell is used to duplicate the effect of Simulacrum, are existing duplicates destroyed?

Should I use my personal or workplace e-mail when registering to external websites for work purpose?

Carnot-Caratheodory metric

Is flight data recorder erased after every flight?

Does duplicating a spell with Wish count as casting that spell?

Inline version of a function returns different value than non-inline version

Could JWST stay at L2 "forever"?

How are circuits which use complex ICs normally simulated?

Extreme, unacceptable situation and I can't attend work tomorrow morning

Is three citations per paragraph excessive for undergraduate research paper?

Inflated grade on resume at previous job, might former employer tell new employer?

What is the steepest angle that a canal can be traversable without locks?

Could a US political party gain complete control over the government by removing checks & balances?

What are the motivations for publishing new editions of an existing textbook, beyond new discoveries in a field?

How was Skylab's orbit inclination chosen?

Why isn't airport relocation done gradually?

How can I fix this gap between bookcases I made?

Manuscript was "unsubmitted" because the manuscript was deposited in Arxiv Preprints

Dual Citizen. Exited the US on Italian passport recently

What is the use of option -o in the useradd command?

How to answer pointed "are you quitting" questioning when I don't want them to suspect

Protecting Dualbooting Windows from dangerous code (like rm -rf)

Why could you hear an Amstrad CPC working?



How to extract random IDs values for elements with jmeter in a jsf web app



The 2019 Stack Overflow Developer Survey Results Are InJmeter - weighted random values?faces FormSignature with JMeter?Testing JSF application with JMeter - ViewState issueExtracting ViewState when testing JSF with JMeterUsing Extracted JSON Value in Another JMeter ThreadCapture WebDriver requests in JmeterJmeter - how to get higher randomize effect?File upload request in SharePoint Website using JMeter proxy recording and load test failsSaving form input from JMeter in a JSF appUpload a file with Jmeter in a JSF web application



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















The application is made with JSF. I recorded the script with JMeter proxy, it works well, but the number in the id for some fields change after a day, so I need to find a way to extract and pass the correct one.
I don't know well how to use Regex, so I will really appreciate any help.
Thank you.



Parameters and values that I need to generate random Image



This is the div in the HTML with the id I need to generate random Div



<div id="solicitudSteps:j_idt75" class="ui-wizard ui-widget" style="width: 100%;">


EDIT



This is the Css Selector I'm using



This is what returns when I test with the Css Selector Tester










share|improve this question



















  • 1





    Just assign it an exlipicit id in the source. And code should be in text, not images

    – Kukeltje
    Mar 22 at 7:08






  • 2





    I think you haven't developed this application. In ideal world, you should ping the application back to the responsible JSF developer and tell him/her to install the showcase.omnifaces.org/viewhandlers/…

    – BalusC
    Mar 22 at 9:10











  • Hi Kukeltje, I'm not the dev, I'm making the script.

    – Ana Gallardo
    Mar 22 at 12:54











  • Then ask the dev to do that or use an xpath selector or css selector or ...

    – Kukeltje
    Mar 22 at 15:18











  • And don't post images of 'code' post it inline...

    – Kukeltje
    Mar 22 at 15:20

















0















The application is made with JSF. I recorded the script with JMeter proxy, it works well, but the number in the id for some fields change after a day, so I need to find a way to extract and pass the correct one.
I don't know well how to use Regex, so I will really appreciate any help.
Thank you.



Parameters and values that I need to generate random Image



This is the div in the HTML with the id I need to generate random Div



<div id="solicitudSteps:j_idt75" class="ui-wizard ui-widget" style="width: 100%;">


EDIT



This is the Css Selector I'm using



This is what returns when I test with the Css Selector Tester










share|improve this question



















  • 1





    Just assign it an exlipicit id in the source. And code should be in text, not images

    – Kukeltje
    Mar 22 at 7:08






  • 2





    I think you haven't developed this application. In ideal world, you should ping the application back to the responsible JSF developer and tell him/her to install the showcase.omnifaces.org/viewhandlers/…

    – BalusC
    Mar 22 at 9:10











  • Hi Kukeltje, I'm not the dev, I'm making the script.

    – Ana Gallardo
    Mar 22 at 12:54











  • Then ask the dev to do that or use an xpath selector or css selector or ...

    – Kukeltje
    Mar 22 at 15:18











  • And don't post images of 'code' post it inline...

    – Kukeltje
    Mar 22 at 15:20













0












0








0








The application is made with JSF. I recorded the script with JMeter proxy, it works well, but the number in the id for some fields change after a day, so I need to find a way to extract and pass the correct one.
I don't know well how to use Regex, so I will really appreciate any help.
Thank you.



Parameters and values that I need to generate random Image



This is the div in the HTML with the id I need to generate random Div



<div id="solicitudSteps:j_idt75" class="ui-wizard ui-widget" style="width: 100%;">


EDIT



This is the Css Selector I'm using



This is what returns when I test with the Css Selector Tester










share|improve this question
















The application is made with JSF. I recorded the script with JMeter proxy, it works well, but the number in the id for some fields change after a day, so I need to find a way to extract and pass the correct one.
I don't know well how to use Regex, so I will really appreciate any help.
Thank you.



Parameters and values that I need to generate random Image



This is the div in the HTML with the id I need to generate random Div



<div id="solicitudSteps:j_idt75" class="ui-wizard ui-widget" style="width: 100%;">


EDIT



This is the Css Selector I'm using



This is what returns when I test with the Css Selector Tester







testing jsf jmeter






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 23 at 7:35









Kukeltje

9,37441439




9,37441439










asked Mar 22 at 2:46









Ana GallardoAna Gallardo

53




53







  • 1





    Just assign it an exlipicit id in the source. And code should be in text, not images

    – Kukeltje
    Mar 22 at 7:08






  • 2





    I think you haven't developed this application. In ideal world, you should ping the application back to the responsible JSF developer and tell him/her to install the showcase.omnifaces.org/viewhandlers/…

    – BalusC
    Mar 22 at 9:10











  • Hi Kukeltje, I'm not the dev, I'm making the script.

    – Ana Gallardo
    Mar 22 at 12:54











  • Then ask the dev to do that or use an xpath selector or css selector or ...

    – Kukeltje
    Mar 22 at 15:18











  • And don't post images of 'code' post it inline...

    – Kukeltje
    Mar 22 at 15:20












  • 1





    Just assign it an exlipicit id in the source. And code should be in text, not images

    – Kukeltje
    Mar 22 at 7:08






  • 2





    I think you haven't developed this application. In ideal world, you should ping the application back to the responsible JSF developer and tell him/her to install the showcase.omnifaces.org/viewhandlers/…

    – BalusC
    Mar 22 at 9:10











  • Hi Kukeltje, I'm not the dev, I'm making the script.

    – Ana Gallardo
    Mar 22 at 12:54











  • Then ask the dev to do that or use an xpath selector or css selector or ...

    – Kukeltje
    Mar 22 at 15:18











  • And don't post images of 'code' post it inline...

    – Kukeltje
    Mar 22 at 15:20







1




1





Just assign it an exlipicit id in the source. And code should be in text, not images

– Kukeltje
Mar 22 at 7:08





Just assign it an exlipicit id in the source. And code should be in text, not images

– Kukeltje
Mar 22 at 7:08




2




2





I think you haven't developed this application. In ideal world, you should ping the application back to the responsible JSF developer and tell him/her to install the showcase.omnifaces.org/viewhandlers/…

– BalusC
Mar 22 at 9:10





I think you haven't developed this application. In ideal world, you should ping the application back to the responsible JSF developer and tell him/her to install the showcase.omnifaces.org/viewhandlers/…

– BalusC
Mar 22 at 9:10













Hi Kukeltje, I'm not the dev, I'm making the script.

– Ana Gallardo
Mar 22 at 12:54





Hi Kukeltje, I'm not the dev, I'm making the script.

– Ana Gallardo
Mar 22 at 12:54













Then ask the dev to do that or use an xpath selector or css selector or ...

– Kukeltje
Mar 22 at 15:18





Then ask the dev to do that or use an xpath selector or css selector or ...

– Kukeltje
Mar 22 at 15:18













And don't post images of 'code' post it inline...

– Kukeltje
Mar 22 at 15:20





And don't post images of 'code' post it inline...

– Kukeltje
Mar 22 at 15:20












1 Answer
1






active

oldest

votes


















0














It looks like these dynamic values are coming from the previous response as hidden inputs so it is the matter of correlation, you can extract these dynamic input names along with the values using i.e. CSS Selector Extractor as




  1. Add CSS Selector Extractor as a child of the previous request and configure it to extract hiddens input names



    enter image description here




  2. Add one more CSS Selector Extractor to get hidden inputs values:



    enter image description here




  3. Add JSR223 PreProcessor as a child of the request where you need to provide dynamic inputs and put the following code into "Script" area:



    1.upto(vars.get('hiddenInputName_matchNr') as int, index ->
    sampler.addArgument(vars.get('hiddenInputName_' + index), vars.get('hiddenInputValue_' + index))
    )


    So the overall test plan structure would look like:



    enter image description here



  4. That's it, JMeter should extract all the dynamic inputs from the previous response and add them to the current request automatically.






share|improve this answer























  • Hi, thank you for your answer, is not an input is a div, I tried this in the Css Selector Tester: Selector: div[class=ui-wizard ui-widget] but it returns Match = 0. I will add the images in the post.

    – Ana Gallardo
    Mar 22 at 12:44











  • I used JODD as the CSS selector extractor implementation and worked. Thank you :D

    – Ana Gallardo
    Mar 22 at 15:42











  • @AnaGallardo: If this answer helped, mark it as such: stackoverflow.com/help/someone-answers

    – Kukeltje
    Mar 23 at 7:37











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55292174%2fhow-to-extract-random-ids-values-for-elements-with-jmeter-in-a-jsf-web-app%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














It looks like these dynamic values are coming from the previous response as hidden inputs so it is the matter of correlation, you can extract these dynamic input names along with the values using i.e. CSS Selector Extractor as




  1. Add CSS Selector Extractor as a child of the previous request and configure it to extract hiddens input names



    enter image description here




  2. Add one more CSS Selector Extractor to get hidden inputs values:



    enter image description here




  3. Add JSR223 PreProcessor as a child of the request where you need to provide dynamic inputs and put the following code into "Script" area:



    1.upto(vars.get('hiddenInputName_matchNr') as int, index ->
    sampler.addArgument(vars.get('hiddenInputName_' + index), vars.get('hiddenInputValue_' + index))
    )


    So the overall test plan structure would look like:



    enter image description here



  4. That's it, JMeter should extract all the dynamic inputs from the previous response and add them to the current request automatically.






share|improve this answer























  • Hi, thank you for your answer, is not an input is a div, I tried this in the Css Selector Tester: Selector: div[class=ui-wizard ui-widget] but it returns Match = 0. I will add the images in the post.

    – Ana Gallardo
    Mar 22 at 12:44











  • I used JODD as the CSS selector extractor implementation and worked. Thank you :D

    – Ana Gallardo
    Mar 22 at 15:42











  • @AnaGallardo: If this answer helped, mark it as such: stackoverflow.com/help/someone-answers

    – Kukeltje
    Mar 23 at 7:37















0














It looks like these dynamic values are coming from the previous response as hidden inputs so it is the matter of correlation, you can extract these dynamic input names along with the values using i.e. CSS Selector Extractor as




  1. Add CSS Selector Extractor as a child of the previous request and configure it to extract hiddens input names



    enter image description here




  2. Add one more CSS Selector Extractor to get hidden inputs values:



    enter image description here




  3. Add JSR223 PreProcessor as a child of the request where you need to provide dynamic inputs and put the following code into "Script" area:



    1.upto(vars.get('hiddenInputName_matchNr') as int, index ->
    sampler.addArgument(vars.get('hiddenInputName_' + index), vars.get('hiddenInputValue_' + index))
    )


    So the overall test plan structure would look like:



    enter image description here



  4. That's it, JMeter should extract all the dynamic inputs from the previous response and add them to the current request automatically.






share|improve this answer























  • Hi, thank you for your answer, is not an input is a div, I tried this in the Css Selector Tester: Selector: div[class=ui-wizard ui-widget] but it returns Match = 0. I will add the images in the post.

    – Ana Gallardo
    Mar 22 at 12:44











  • I used JODD as the CSS selector extractor implementation and worked. Thank you :D

    – Ana Gallardo
    Mar 22 at 15:42











  • @AnaGallardo: If this answer helped, mark it as such: stackoverflow.com/help/someone-answers

    – Kukeltje
    Mar 23 at 7:37













0












0








0







It looks like these dynamic values are coming from the previous response as hidden inputs so it is the matter of correlation, you can extract these dynamic input names along with the values using i.e. CSS Selector Extractor as




  1. Add CSS Selector Extractor as a child of the previous request and configure it to extract hiddens input names



    enter image description here




  2. Add one more CSS Selector Extractor to get hidden inputs values:



    enter image description here




  3. Add JSR223 PreProcessor as a child of the request where you need to provide dynamic inputs and put the following code into "Script" area:



    1.upto(vars.get('hiddenInputName_matchNr') as int, index ->
    sampler.addArgument(vars.get('hiddenInputName_' + index), vars.get('hiddenInputValue_' + index))
    )


    So the overall test plan structure would look like:



    enter image description here



  4. That's it, JMeter should extract all the dynamic inputs from the previous response and add them to the current request automatically.






share|improve this answer













It looks like these dynamic values are coming from the previous response as hidden inputs so it is the matter of correlation, you can extract these dynamic input names along with the values using i.e. CSS Selector Extractor as




  1. Add CSS Selector Extractor as a child of the previous request and configure it to extract hiddens input names



    enter image description here




  2. Add one more CSS Selector Extractor to get hidden inputs values:



    enter image description here




  3. Add JSR223 PreProcessor as a child of the request where you need to provide dynamic inputs and put the following code into "Script" area:



    1.upto(vars.get('hiddenInputName_matchNr') as int, index ->
    sampler.addArgument(vars.get('hiddenInputName_' + index), vars.get('hiddenInputValue_' + index))
    )


    So the overall test plan structure would look like:



    enter image description here



  4. That's it, JMeter should extract all the dynamic inputs from the previous response and add them to the current request automatically.







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 22 at 9:14









Dmitri TDmitri T

75k33765




75k33765












  • Hi, thank you for your answer, is not an input is a div, I tried this in the Css Selector Tester: Selector: div[class=ui-wizard ui-widget] but it returns Match = 0. I will add the images in the post.

    – Ana Gallardo
    Mar 22 at 12:44











  • I used JODD as the CSS selector extractor implementation and worked. Thank you :D

    – Ana Gallardo
    Mar 22 at 15:42











  • @AnaGallardo: If this answer helped, mark it as such: stackoverflow.com/help/someone-answers

    – Kukeltje
    Mar 23 at 7:37

















  • Hi, thank you for your answer, is not an input is a div, I tried this in the Css Selector Tester: Selector: div[class=ui-wizard ui-widget] but it returns Match = 0. I will add the images in the post.

    – Ana Gallardo
    Mar 22 at 12:44











  • I used JODD as the CSS selector extractor implementation and worked. Thank you :D

    – Ana Gallardo
    Mar 22 at 15:42











  • @AnaGallardo: If this answer helped, mark it as such: stackoverflow.com/help/someone-answers

    – Kukeltje
    Mar 23 at 7:37
















Hi, thank you for your answer, is not an input is a div, I tried this in the Css Selector Tester: Selector: div[class=ui-wizard ui-widget] but it returns Match = 0. I will add the images in the post.

– Ana Gallardo
Mar 22 at 12:44





Hi, thank you for your answer, is not an input is a div, I tried this in the Css Selector Tester: Selector: div[class=ui-wizard ui-widget] but it returns Match = 0. I will add the images in the post.

– Ana Gallardo
Mar 22 at 12:44













I used JODD as the CSS selector extractor implementation and worked. Thank you :D

– Ana Gallardo
Mar 22 at 15:42





I used JODD as the CSS selector extractor implementation and worked. Thank you :D

– Ana Gallardo
Mar 22 at 15:42













@AnaGallardo: If this answer helped, mark it as such: stackoverflow.com/help/someone-answers

– Kukeltje
Mar 23 at 7:37





@AnaGallardo: If this answer helped, mark it as such: stackoverflow.com/help/someone-answers

– Kukeltje
Mar 23 at 7:37



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55292174%2fhow-to-extract-random-ids-values-for-elements-with-jmeter-in-a-jsf-web-app%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript