我想知道是否有可能在WKWebView中自动填充元素?或者像自动点击它们一样。
我想制作一个脚本,在Web浏览器中自动填充信息。
(也许使用javascript之类的东西。]
iOS 11.0在应用程序中引入了用户名和密码自动填充功能,也可以在WKWebView中使用它。
请参阅Apple文档中的Enabling Password AutoFill on an HTML Input Element。
简而言之:
<input id="password-text-field" type="password" autocomplete="current-password"/>
<input id="user-text-field" type="email" autocomplete="username"/>