I’m having an issue inserting a variable into a string that has a dash sign. Kantu/selenium I believe thinks the dash is a minus sign and therefore it’s not working. The “A” at the end of the string is my variable. The xpath is as follows:
//*[@id=“inputInfringingElement-${A}”]
This results in an error and it shows that the variable didn’t get inserted (says it fails to find //*[@id=“inputInfringingElement-${A}”]). But if I put like a space inbetween - and ${A} it will insert the variable but it still fails to find the xpath because now there’s that space. Might be something really stupid but I can’t figure out how to get it to work.
Well, in my case I have no space and it still replaces the variable ok. It does not find the element, because I run it on a different website, since I do not have the URL of your website.
So I can get it to work with no space just doing something like you did using 123 or ABC.
But the issue comes when I’m storing a value like the following: B002WJFRTG
Then it won’t work for whatever reason. Except if I remove the “G” off the end, then it works. So I have no idea what’s going on.
Yeah it did, so I deleted the lines of code I had written and tried again and now it’s working. I have no idea why it wasn’t before but thank you for your help.
Also, any word on the pausing issue? Ever since the last update when I run macros that take several minutes to complete, they will often stop (no errors, they just stop). Hitting pause/resume will get them going again but it’s pretty annoying.
Can you please make a new forum post for this topic? Ideally with a test macro. For example, if you do a simple macro with a long PAUSE command, do you see this issue, too? (I tested with a 300 seconds pause and all worked fine)