简体   繁体   English

意外字符“

[英]Unexpected character "

For some reason I am getting an error message Unexpected character " however it doesn't actually underline any of my code in read. I tried cleaning and rebuilding it but that hasn't worked. It says it's on line 49. 由于某种原因,我收到一条错误消息“ Unexpected character "但是它实际上并没有在读取的代码中加下划线。我尝试清理并重建它,但这没有用。它说它在第49行。

My code is as follows 我的代码如下

By maximizeBy = By.Name("Maximize");
webDriverWait.Until(ExpectedConditions.ElementExists(maximiz‌​eBy));

Line 49 below 下面的第49行

webDriverWait.Until(ExpectedConditions.ElementToBeClickable(‌​
    excelSession.FindEle‌​ment(maximizeBy))).Cl‌​ick();

You've got two "odd" characters within FindElement - U+200C (zero-width non-joiner) and U+200B (zero-width space) between the first "e" and the "m". FindElement您有两个“奇数”字符-第一个“ e”和“ m”之间的U + 200C (零宽度非连接符)和U + 200B (零宽度空格)。 The same characters occur in "Click" between the "l" and the "i". 在“ l”和“ i”之间的“点击”中出现相同的字符。

Just delete and retype those words and the error should go away. 只需删除并重新输入这些单词,错误就会消失。 It's not clear how you ended up with those characters, admittedly... 尚不清楚您最终如何获得这些角色,诚然...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM