firefox

web自动化测试-D3-学习笔记之一(Selenium彩蛋篇-Xpath使用方法)

这一生的挚爱 提交于 2021-02-11 18:02:39
由于最新版火狐不在支持FireBug等开发工具,可以通过 https://ftp.mozilla.org/pub/firefox/releases/ 下载49版本以下的火狐就可以增加Firebug等扩展了。 什么是Xpath? XPath是XML的路径语言,通俗一点讲就是通过元素的路径来查找到这个标签元素。 工具 Xpath的练习建议大家安装火狐浏览器后,下载插件,FireBug。 Xpath使用方法 注:默认死格式 先写 //* 代表定位页面下所有元素 1、Xpath支持ID、Class、Name定位功能 1 2 3 4 5 6 7 8 9 10 11 通过 ID定位 / / * [ @ id = 'kw' ] 通过 Class定位 / / * [ @ class = 'class_name' ] 通过 Name定位 / / * [ @ name = 'name' ] 2、如果标签没有ID、Class、Name三总属性,Xpath还支持属性定位功能 1 2 3 @ 代表以属性定位,后面可以接标签中任意属性 / / * [ @ other = 'attribute' ] 3、当标签的属性重复时,Xpath提供了通过标签来进行过滤 1 2 3 将 * 换位任意标签名,则可根据标签进行筛选 / / input [ @ placeholder = '用户名' ] 4、当标签页重复时

Automatically executing code in browser console on key press (firefox)

爷,独闯天下 提交于 2021-02-11 14:17:42
问题 I have a little snippet of code that I want to execute in the console: :screenshot --selector canvas.page to make a screenshot of a specific canvas on a page. Now i was wondering if i can execute that in console when I press specific keys in Firefox. I don't know how I can accomplish that and am hoping for some help. 来源: https://stackoverflow.com/questions/65359612/automatically-executing-code-in-browser-console-on-key-press-firefox

Firefox(headless)+selenium cannot access internet from docker container

泄露秘密 提交于 2021-02-11 14:02:30
问题 I have tested the internet connection by wget https://www.google.com and it worked from inside the docker. But, when I run a headless firefox with selenium python binding, selenium throughs the TimeoutException : >> docker run myselcontainer Traceback (most recent call last): File "run.py", line 24, in <module> driver = webdriver.Firefox(service_log_path=os.devnull, options=options, capabilities=capabilities, firefox_profile=profile) File "/usr/local/lib/python3.8/site-packages/selenium

accessing escape key when mozilla is in full screen

人盡茶涼 提交于 2021-02-11 10:31:04
问题 Not able to override firefox's escape key functionality when firefox is in full screen mode. Is it normal? Here is my code to cancel fullscreen on button click: function cancelFullscreen() { if(document.cancelFullScreen) { document.cancelFullScreen(); } else if(document.mozCancelFullScreen) { document.mozCancelFullScreen(); } else if(document.webkitCancelFullScreen) { document.webkitCancelFullScreen(); } } Works fine on all browsers expect mozilla, can't seem to override or do a keyup for

accessing escape key when mozilla is in full screen

烂漫一生 提交于 2021-02-11 10:30:54
问题 Not able to override firefox's escape key functionality when firefox is in full screen mode. Is it normal? Here is my code to cancel fullscreen on button click: function cancelFullscreen() { if(document.cancelFullScreen) { document.cancelFullScreen(); } else if(document.mozCancelFullScreen) { document.mozCancelFullScreen(); } else if(document.webkitCancelFullScreen) { document.webkitCancelFullScreen(); } } Works fine on all browsers expect mozilla, can't seem to override or do a keyup for

VueJS - DOMException: “The operation is insecure.”

百般思念 提交于 2021-02-10 23:42:02
问题 I am getting DOMException: "The operation is insecure." error in the console from my website (using Vue). It only happens when it's hosted on github pages but it it doesn't error when it's being run locally. Github page url: https://cubxity.github.io/ks/#/display/2227?scopes=&displayTime=true My browser is Firefox, build id: 20181206201918 回答1: TL;DR: This isn't a Vue issue: you cannot programmatically alter the contents of a form input through the DOM. Input file fields are more rigorously

VueJS - DOMException: “The operation is insecure.”

做~自己de王妃 提交于 2021-02-10 23:41:04
问题 I am getting DOMException: "The operation is insecure." error in the console from my website (using Vue). It only happens when it's hosted on github pages but it it doesn't error when it's being run locally. Github page url: https://cubxity.github.io/ks/#/display/2227?scopes=&displayTime=true My browser is Firefox, build id: 20181206201918 回答1: TL;DR: This isn't a Vue issue: you cannot programmatically alter the contents of a form input through the DOM. Input file fields are more rigorously

ReferenceError: google is not defined - Google Apps script error in Mozilla firefox

孤街浪徒 提交于 2021-02-10 21:58:56
问题 I'm creating a Google Site with Google Apps Script "Enum Sandbox Iframe mode". In Google Developer Docs, It says, to call a custom function, we need to use google.script.run Sample: Code.gs function doGet() { return HtmlService.createHtmlOutputFromFile('index') .setSandboxMode(HtmlService.SandboxMode.IFRAME); } function doSomething() { Logger.log('I was called!'); } index.html <script> google.script.run.doSomething(); </script> When I run this using Google Chrome, Its working perfect. But it

Selenium: “Failed to Decode Response from Marionette”

允我心安 提交于 2021-02-10 20:50:40
问题 I've seen this issue around, but, unfortunately, I have struggled to find a definite resolution. Perhaps, if someone has it working for themselves, they could share what firefox and geckodriver combination they have it working with. Edit: I am running this through Jenkins, so maybe there is an embedded firefox in Jenkins that this is using, which differs from that on the server, itself. For myself, I am using: Centos 7 Mozilla Firefox 67.0 GeckoDriver version 0.26.0 (for linux64; downloaded

Selenium: “Failed to Decode Response from Marionette”

强颜欢笑 提交于 2021-02-10 20:31:10
问题 I've seen this issue around, but, unfortunately, I have struggled to find a definite resolution. Perhaps, if someone has it working for themselves, they could share what firefox and geckodriver combination they have it working with. Edit: I am running this through Jenkins, so maybe there is an embedded firefox in Jenkins that this is using, which differs from that on the server, itself. For myself, I am using: Centos 7 Mozilla Firefox 67.0 GeckoDriver version 0.26.0 (for linux64; downloaded