【发布时间】:2017-08-28 13:43:29
【问题描述】:
我正在尝试用Selenium 和PHP 投票支持YouTube 评论,我正在使用Facebook Webdriver。
我的问题是 click 没有任何作用,它可以在任何其他网站上运行,但不适用于 YouTube 投票。
我在 Windows 10 上使用带有 geckodriver 和 firefox 55.0.3 的 Selenium 3.4.0
我的代码是这样的:
Login
Go to the comment url
Scroll down and wait comments to show up
$element = $driver->findElement(WebDriverBy::xpath("(//a[contains(@class, 'comment-author-text') and contains(text(),'channelname')]/following::button[contains(@class, 'i-a-v-sprite-like')])[1]"));
$element->click();
我尝试了$driver->getMouse(),但它不起作用。
经过一番搜索,我发现它无法与我的设置一起使用,我需要降级 selenium,但我不想这样做。
【问题讨论】:
-
“经过一番搜索,我发现它无法与我的设置一起使用,我需要降级 selenium,但我不想这样做”。你有点回答了你自己的问题。升级你的东西,或者降级 selenium。
-
我需要降级,才能使用鼠标移动,但我不想这样做
-
为什么新的 Selenium 不起作用?什么旧东西阻碍了它?
-
@delboy1978uk 基本上任何与 remotemouse 相关的东西都不适用于新版本