Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to escape '|' pipe characters in regex matches on Windows #39

Open
brian-mcmaster opened this issue Jun 13, 2017 · 1 comment
Open

Comments

@brian-mcmaster
Copy link

brian-mcmaster commented Jun 13, 2017

Just ran into another issue with LDTP here at Tableau Software. We use pipe characters to delimit our Pseudoloc strings, so and example string looks like this: "23153-|Blah|"

This causes problems because the pipe characters don't get escaped in the internal regex matches in Utils.cs, so it considers the '|' characters to be 'or'. And since the string ENDS in a pipe character, it matches any control with a caption of empty string, which is really bad.

It's an easy fix, just have to escape the pipe characters in line 144 of ldtpd\Utils.cs and make them be '|' just like the rest of the escapes. In addition, I had to add this around line 626 in the same file:
tmp = Regex.Replace(tmp, @"|", @"|");

I haven't tested this on other non-Windows platforms yet.

Thanks,
Brian McMaster
Principal Software Test Engineer
Tableau Software (http://www.tableau.com)

@brian-mcmaster
Copy link
Author

Any comments? Is this by-design? Are you supposed to be able to do waittillguiexist("window", "one|two|three") to wait for any of three controls to appear on the window?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant