firefox

selenium 自动化工具

允我心安 提交于 2021-02-09 09:56:44
问题 今天在使用 selenium + PhantomJS 动态抓取网页时,出现如下报错信息: UserWarning: Selenium support for PhantomJS has been deprecated, please use headless versions of Chrome or Firefox instead warnings.warn('Selenium support for PhantomJS has been deprecated, please use headless ' 翻译过来就是:selenium已经放弃PhantomJS,了,建议使用火狐或者谷歌无界面浏览器。 解决办法: 我们就改用 Selenium + Headless Chrome 1.安装Chrome浏览器 2.安装Selenium pip install selenium 3.安装chromedriver chromedriver下载地址: https://sites.google.com/a/chromium.org/chromedriver/downloads (被墙了) http://npm.taobao.org/mirrors/chromedriver/(可用) 注意 :chromedriver的版本要与你使用的chrome版本对应,对应关系: 点击链接 下载完成后

Selenium辅助工具

孤者浪人 提交于 2021-02-09 09:01:52
下载Firefox39.0版本浏览器,安装firebug和FirePath。最新版的Firefox在扩展组件中无法找到firebug,可以使用旧的版本的Firefox浏览器。 FirePath插件的使用: 1)使用手写XPath和CSS方式查找页面元素 启用Firefox浏览器,访问www.baidu.com网页。 启动Firebug插件,单击“FirePath”标签栏显示FirePath的使用界面。 在上图输入框中输入 XPath定位表达式“ //input[@id=" kw" ]” ,或者CSS定位表达式“input#kw”,查找页面中input标签的id 属性为“ kw”的输入框,回车 后,在 FirePath插件的代码显示区域会显示查找到的页面元素的 HTML代码,在网页显示区域中,搜索输入框以虚线框样式显示: 2)使用 FirePath插件获取页面元素的 XPath和CSS表达式 启动 FirePath浏览器,访问http://www.baidu.com 网页。 启动 Firebug插件。 在百度首页搜索框上方单击鼠标右键,在弹出的快捷菜单中选择“使用 Firebug查看元素”命令: 此时在Firebug插件的HTML标签区域高亮显示搜索框对应的HTML代码,选择高亮代码,右键然后点击复制XPath或者复制CSS路径,粘贴到文本文件中即可看到XPath或者CSS表达式:

Is the file:// protocol for web browser links defunct?

强颜欢笑 提交于 2021-02-09 07:03:50
问题 Is the file protocol effectively defunct? It would be extremely useful to me if an intranet server could generate links such as <a href="file:///shared/customer_info/customer-name"> <a href="file:///shared/customer_info/customer-name/history.ods"> Since it's an internal intranet app, the server and the users' systems share access to the same filestore, so this is sensible. Unfortunately, Firefox and Chrome have disabled file:// links. The only thing I can do with them is right-click, copy

text selection on a element behind an absolute element

[亡魂溺海] 提交于 2021-02-08 17:23:32
问题 I have an overlay element that hides other div's that contains text. the overlay element is absolute positioned. I want the user to be able to select a text on those div's behind. My solution was to hide the overlay (display: none) on user event mouseDown and show it again when the mouseUp event occurred. that way as soon as the overlay is hidden the user can select the text (as long as the mouseUp hasn't occurred yet). This solution seems to work on chrome and safari but not on firefox, any

text selection on a element behind an absolute element

♀尐吖头ヾ 提交于 2021-02-08 17:21:46
问题 I have an overlay element that hides other div's that contains text. the overlay element is absolute positioned. I want the user to be able to select a text on those div's behind. My solution was to hide the overlay (display: none) on user event mouseDown and show it again when the mouseUp event occurred. that way as soon as the overlay is hidden the user can select the text (as long as the mouseUp hasn't occurred yet). This solution seems to work on chrome and safari but not on firefox, any

text selection on a element behind an absolute element

最后都变了- 提交于 2021-02-08 17:21:36
问题 I have an overlay element that hides other div's that contains text. the overlay element is absolute positioned. I want the user to be able to select a text on those div's behind. My solution was to hide the overlay (display: none) on user event mouseDown and show it again when the mouseUp event occurred. that way as soon as the overlay is hidden the user can select the text (as long as the mouseUp hasn't occurred yet). This solution seems to work on chrome and safari but not on firefox, any

text selection on a element behind an absolute element

て烟熏妆下的殇ゞ 提交于 2021-02-08 17:21:22
问题 I have an overlay element that hides other div's that contains text. the overlay element is absolute positioned. I want the user to be able to select a text on those div's behind. My solution was to hide the overlay (display: none) on user event mouseDown and show it again when the mouseUp event occurred. that way as soon as the overlay is hidden the user can select the text (as long as the mouseUp hasn't occurred yet). This solution seems to work on chrome and safari but not on firefox, any

text selection on a element behind an absolute element

大兔子大兔子 提交于 2021-02-08 17:21:07
问题 I have an overlay element that hides other div's that contains text. the overlay element is absolute positioned. I want the user to be able to select a text on those div's behind. My solution was to hide the overlay (display: none) on user event mouseDown and show it again when the mouseUp event occurred. that way as soon as the overlay is hidden the user can select the text (as long as the mouseUp hasn't occurred yet). This solution seems to work on chrome and safari but not on firefox, any

text selection on a element behind an absolute element

淺唱寂寞╮ 提交于 2021-02-08 17:19:33
问题 I have an overlay element that hides other div's that contains text. the overlay element is absolute positioned. I want the user to be able to select a text on those div's behind. My solution was to hide the overlay (display: none) on user event mouseDown and show it again when the mouseUp event occurred. that way as soon as the overlay is hidden the user can select the text (as long as the mouseUp hasn't occurred yet). This solution seems to work on chrome and safari but not on firefox, any

Open blob files in Firefox not working

爱⌒轻易说出口 提交于 2021-02-08 15:17:45
问题 I would open files sent from server on Firefox. Actually it's working on IE. Here's how I proceed. openFile(path, fileName) { this.creditPoliciesService .openFile(path) .toPromise() .then(data => { var blob = new Blob([data.body], { type: "application/pdf" }); if (window.navigator && window.navigator.msSaveOrOpenBlob) { //if navigator is IE window.navigator.msSaveOrOpenBlob(blob, fileName); } else { // Mozilla case var fileURL = URL.createObjectURL(blob); //URL.createObjectURL takes only one