Problem: I know this answer has been posted previously; however, neither of the suggested Selenium IDE methods for extracting a substring value work. Below, I have referenced the posts. However, they are pretty old. Both the suggested methods return the same issue, which is returning the javascript as a string result rather than being executed as a script and returning the array value specified. If I use the variable format @{variable}
, it returns ‘undefined’ as the result.
What I have tried: I’ve tried the posted suggestions as well as these of my own, even using execute script
besides store
and I received ‘undefined’ but it does not fail.
Other code:
javascript{${edsTotalDocs}.split(" ")[${position}]}
${edsTotalDocs}.split(" ")[${position}]
What I’m trying to do: I’m trying to capture the large number into a variable (i.e., 46,645)
I think I’m doing it correctly as described in the posts, however, maybe not. I was hoping someone could provide a solution or point out where I’m doing it incorrectly.
Stack Overflow Post
Elemental Selenium
Stack Overflow Post
Current Code:
Current Result: