How can ı use random xpath?
-
Hello.How can ı use random xpath?
-
What do you mean? Can you make an example of what you want to achieve and which blocks you have right now?
-
Example; I have 10 xpath code.I want randomly select xpath in this
-
Make a list of those xpaths (a list variable in OB) and then use UTILITY List Random to take a random element
-
I couldn't do it.Can you share screenshot with example? I couldn't find any example in youtube and google.
Thanks for everything.
-
https://forum.openbullet.dev/topic/454/how-to-use-random-preset-values
Just replace one, two, three with your XPATHs and use a separator that does not clash with the values themselves (if XPATHs can contain a comma, do not use comma as separator use something else and adjust it accordingly).
-
I couldn't randomly click in website
My xpaths//*[@id="Layer_1"] /html/body/header/a[1] /html/body/header/a[2]
I edited your code and this
BROWSERACTION Open NAVIGATE "https://mynet.com" SET VAR "LIST" "/html/body/header/span,//*[@id="Layer_1"],/html/body/header/a[1],/html/body/header/a[2]" UTILITY Variable "LIST" Split "," -> VAR "NEWLIST" UTILITY List "NEWLIST" Random -> VAR "MYRANDOMVALUE"
-
any update ?
-
Well of course after the last utility block you have to add an Element action and give it your MYRANDOMVALUE variable and do the Click action
-
It's didnt work.Can you test for me?