Unanswered question

Variable extraction for dropdown item getting re-order randomly, no unique LB

scenario: There are many drop downs from where items need to be selected. Some drop down items when selected even has sub drop down. And these drop down list is getting re-order randomly.

Tried: I use xpath in neoload to get the id of the particular item that is going in the request, then with the help of LB and Rb I extracted the value, But now the issue is xpath searched by the position. And as the drop down items list is getting re-order randomly, there are some cases where the items having sub items gets placed in that position (mentioned in xpath), thus unable to capture.

Could anyone please help to how to handle these kind of issue where the dropdown list is getting re-order randomly.

Also for some items name I have a unique RB, but no unique LB..

How to handle this please assist.
Your prompt response will be highly appreciated. Thanks.

pallavi D.
pallavi D.

pallavi D.

Level
0
57 / 100
points

Answers

Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

With XPath you can select a path without mentionning any position. Have you tried it?

If you could provide the full server response and some details about the value you would like to extract we can have a look.

pallavi D.
pallavi D.

pallavi D.

Level
0
57 / 100
points

I have attached a screenshot of the xpath I tried. It's in format: html/body[1]/div[3]/div[2]/div[3]/form[1]/div[2]/div[1]/div[1]/div[1]/select[1]/option[6]..
Please advice if selecting a path without mentioning any position will help in this. If so please advice how to do that.

Also,Please find the response attached.. value to be extracted are: 214812664,201742981,201742999,201744368,313677877
These values are generated against an item. and these items list are getting re-order constantly. Example: 214812664 is for Chips & Salsa and on 1 iteration it's occurring in 3 position of the dropdown list whereas on the next it may occur in 4th. Due to which by using the above xpath format it's failing to pick the code against desired item.

Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

Not sure that a XPath is the best choice to extract your values. I have two questions. Why would you like to extract the list of id's that you mentionned and not for example that id: 313676860

I ask that because i do not see the difference between that id "313676860" and this one "214812664" in the server response.

Or are you only interested by exactly those: Chips & Salsa, Southwestern Quesadillas - Bacon Ranch Chicken etc...

In that case you could extract your ID's based on those items even using multiple variable extractor.

Let me know.