on 03-27-2023 2:26 PM
Hi team,
I am automating Task where the bot needs to get the number of items from the shopping cart button.
I have declared a element in application where it shows as 0 items.
The items in the cart may be 1 item or 2 items(i.e Dynamic).
How do i get the dynamic cart values from the shopping cart button.
The element which i have declared doesnt have ID criteria as well and its only recognisable with criteria Text equals 0 items.and its not validating for other criterias.
Please help me with this issue asap.
Regards,
Bhagyashree
Hello,
To avoid this issue, you need to remove the 0 from the criterion Text you put, so that whatever the number of items in your cart is, the element will be recognized. You also need to change the operator from equals to contains in order to always detect this element.
If it's not sufficient, I suggest you to use advanced pattern techniques. More info can be found here.
Let me know if you need more help on this issue.
Thanks a lot and best regards,
Baptiste
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please consider using "var sub = text.substr(0, text.length - 6);" instead of "var sub = text.substr(0);" to extract the desired substring from the input text.
Martina
User | Count |
---|---|
75 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.