问题描述
我能够执行以下操作: (在 NavigationCompletedAsync 处理程序中)
```
string0 = ExecuteScriptAsync("document.documentElement.outerHTML;");
Regex.Unescape(string0)
string0.Remove(0,1);
string0.Remove(string0.Length - 1,1);
```
我可以在编辑器中看到 html 页面。 id 为“userId-input”的
但是当我这样做时:
ExecuteScriptAsync("document.GetElementsById('userId-input').outerHTML;");
结果为“空”
在两次调用之间插入 5 秒延迟没有帮助。
感谢任何输入。 谢谢!
解决方法
请考虑关闭。
我有两个拼写错误:
GetElementsById
应该是:
getElementById
现在一切正常。