网络驱动程序:点击“共享位置" Firefox中的按钮 [英] Webdriver: Click "Share Location" button in Firefox

查看:76
本文介绍了网络驱动程序:点击“共享位置" Firefox中的按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Webdriver测试位置敏感的网站,并希望以编程方式(使用WebDriver API调用)单击共享位置"按钮,当我单击指向位置敏感"部分的链接时,该按钮会弹出网络应用程序.

I am trying to use Webdriver to test a location aware website and would like to programatically (using WebDriver API call) click on the "Share Location" button that pops up when I click on a link to the location aware part of the web application.

这是浏览器提示,似乎不是DOM元素或javascript弹出元素.

It is a browser prompt and does not seem to be a DOM element or javascript popup element.

推荐答案

万一有人有兴趣了解... 我不相信您可以使用网络驱动程序来单击该按钮,因为它不像其他答案所建议的那样位于DOM中(即,不属于网络文档的一部分).但是,您可以创建Firefox配置文件来操纵地理位置,或在Firefox中将共享位置"设置更改为允许".

In case anyone is interested in knowing... I don't believe you can use the webdriver to click that button since it's not in the DOM (ie. not part of the web document) as suggested by other answers. However, you can create firefox profiles to manipulate geolocations or change the "Share Location" setting to "Allow" in Firefox.

有关更多信息,请参见以下链接: http://selenium.polteq.com/nl/在firefox中使用selenium-webdriver更改地理位置/

See the following link for more info: http://selenium.polteq.com/nl/change-geolocation-in-firefox-with-selenium-webdriver/

这篇关于网络驱动程序:点击“共享位置" Firefox中的按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆