Skip to content

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

Open

Description

@brian-mcmaster

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)

Activity

  1. brian-mcmaster commented on Jun 26, 2017

    @brian-mcmaster
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions