[英]How to click a button when a page loads
Ive got to programmatically click a cookie accept button when a page loads.当页面加载时,我必须以编程方式单击 cookie 接受按钮。 I tried a few different addons that are showed online.
我尝试了一些在线显示的不同插件。 Those did not work...
那些没有用...
The button has the following code:该按钮具有以下代码:
<a id="acceptAllPrivacyOptionsAtag" class="bcGiveConsent bcpConsentButtonAtag bcpConsentOKButtonAtag" aria-label="accept all privacy options" role="button"> accept all cookies </a>
Is there a way to do this in javascript?有没有办法在javascript中做到这一点? I have to execute the code in bash shell when the page loads.
当页面加载时,我必须在 bash shell 中执行代码。
好吧,有一种叫做 Alert() 的东西,它在页面加载时会没事,但不是最好的选择。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.