Invalid xPath expression when using appium and winappdriver

422 views Asked by At

I'm trying to select an email in my automation code in outlook. I want to select the email by the name but the name contains the send date that I don't know. So I'm trying to find it out after Xpath.

Here is how I try to find it.

'//@[starts-with(normalize-space(text()), "From user-1, Subject testing sendmail,")]'

I get this error:

Original error: Invalid XPath expression: //@[starts-with(normalize-space(text()), "From reporter-user-1, Sub
ject testing sendmail,")]
1

There are 1 answers

0
JaSON On BEST ANSWER

//@ is invalid syntax. If you want to check name attribute you need to use either //@* or //@name