firefox

selenium+python环境搭建

随声附和 提交于 2021-01-22 09:40:37
selenium介绍: selenium1,也称为seleniumRC或者Remote Control。就是selenium的原本项目。RC是在浏览器启动后,使用js来驱动浏览器的操作。为什么叫RC呢?因为RC的设计是可以支持控制远程服务器上的selenium server来操作远程端的浏览器。 selenium2,也称为selenium webdriver。webdriver原来是另一个自动化测试工具,后与selenium 合并了。webdriver直接调用浏览器本身对自动化支持的接口来驱动浏览器的操作。故名思义,它将有不同的driver来驱动不同系统上不同的浏览器 简单说,selenium项目原本的工具是IDE、RC、grid,然后集成的一个框架。也是目前最流行的的PC B/S架构自动化测试框架。 一、安装python 链接: https://www.python.org/downloads/ 根据自己熟悉版本下载,大体上有2.X和3.X两个版本,新手建议直接入手python3,语法比python2简单易学;安装完成python的安装目录添加到环境变量,方便以后命令窗口符调试;    安装成功python会默认下载好pip和setuptools,python2可能需要另外下载(解压包然后easy_insatll 命令安装) 二、安装selenium pip install

How do I stop Firefox from forcing https:// on local development server?

心不动则不痛 提交于 2021-01-22 06:26:53
问题 I am running a development environment on my Macintosh using AMPPS. I have a folder with my project files. I have added this to my hosts file: 127.0.0.1 www.example.com and I have set up the virtual domain accordingly. When I attempt to connect to the site using Firefox: http://www.example.com it always redirects to: https://www.example.com and then complains about it. The folder has nothing else in it but a dummy index.html file. When I test the site in lynx or in Safari or Chrome , I get to

Kubernetes Dashboard 【转】

不问归期 提交于 2021-01-22 02:49:31
前面章节 Kubernetes 所有的操作我们都是通过命令行工具 kubectl 完成的。为了提供更丰富的用户体验,Kubernetes 还开发了一个基于 Web 的 Dashboard,用户可以用 Kubernetes Dashboard 部署容器化的应用、监控应用的状态、执行故障排查任务以及管理 Kubernetes 各种资源。 在 Kubernetes Dashboard 中可以查看集群中应用的运行状态,也能够创建和修改各种 Kubernetes 资源,比如 Deployment、Job、DaemonSet 等。用户可以 Scale Up/Down Deployment、执行 Rolling Update、重启某个 Pod 或者通过向导部署新的应用。Dashboard 能显示集群中各种资源的状态以及日志信息。 可以说,Kubernetes Dashboard 提供了 kubectl 的绝大部分功能,大家可以根据情况进行选择。 安装 Kubernetes 默认没有部署 Dashboard,可通过如下命令安装: kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml

How do you use onPageLoad in Javascript?

人走茶凉 提交于 2021-01-21 07:58:05
问题 I tried using onPageLoad: function() { alert("hi"); } but it won't work. I need it for a Firefox extension. Any suggestions please? 回答1: If you want to do this in vanilla javascript, just use the window.onload event handler. window.onload = function() { alert('hi!'); } 回答2: var itsloading = window.onload; or <body onload="doSomething();"></body> //this calls your javascript function doSomething for your example <script language="javascript"> function sayhi() { alert("hi") } </script> <body

List of Firefox and Chrome arguments/preferences

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-21 04:56:41
问题 As a tester, I would like to study a list of possible configuration arguments for Firefox and Chrome, So that I can configure my testing tools with knowledge Reading API indicates that there are methods with whom we can pass arguments to a webdriver instance: FirefoxOptions.AddArgument FirefoxOptions.SetLoggingPreference (inherited from DriverOptions) FirefoxOptions.SetPreference What exactly can be the possible arguments passed to these methods and what they do ? Is there a resource online

css隐藏滚动条 兼容谷歌、火狐、IE等各个浏览器

安稳与你 提交于 2021-01-21 03:27:27
项目中,页面效果需要展示一个页面的移动端效果,使用的是一个苹果手机样式背景图,咋也没用过苹果,咋也不敢形容。 如下图所示: 在谷歌浏览器如图一滚动条顺利隐藏,但是火狐就如图二了,有了滚动条丑的一批。 先上谷歌浏览器解决滚动条代码: CSS代码: <style> .tp_box1{ width: 517px; height: 400px;  /* auto在那个方向有益处 就在那个方向上有滚动条 */  overflow: auto; } .tp_box1::-webkit-scrollbar{ display: none; } .tp_box2{ width: 100%; height: 500px; background: pink; } .tp_box3{ width: 100%; height: 500px; background: red; } .tp_box4{ width: 100%; height: 500px; background: black; } </style> HTML代码: <div class="tp_box1">   <div class="tp_box2"></div>   <div class="tp_box3"></div>   <div class="tp_box4"></div> </div> 上述代码完美解决图一问题,但是此方法不兼容火狐

What's the difference between a browser engine and rendering engine?

自古美人都是妖i 提交于 2021-01-20 18:31:05
问题 I found some similar questions but they do not fully respond to the one I have, here is the list that I hope will help someone else: What's the difference between a browser engine, a rendering engine and a user agent? Difference between layout engine and javascript engine As explained here https://www.html5rocks.com/en/tutorials/internals/howbrowserswork/ The browser engine: marshals actions between the UI and the rendering engine. The rendering engine: responsible for displaying requested

What's the difference between a browser engine and rendering engine?

人盡茶涼 提交于 2021-01-20 18:29:25
问题 I found some similar questions but they do not fully respond to the one I have, here is the list that I hope will help someone else: What's the difference between a browser engine, a rendering engine and a user agent? Difference between layout engine and javascript engine As explained here https://www.html5rocks.com/en/tutorials/internals/howbrowserswork/ The browser engine: marshals actions between the UI and the rendering engine. The rendering engine: responsible for displaying requested

java+selenium——键盘操作+复制粘贴(actions方法)

时光毁灭记忆、已成空白 提交于 2021-01-20 10:58:42
参考网址:https://blog.csdn.net/u011541946?t=1 package rjcs; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.List; import org.openqa.selenium.interactions.Actions; import org.apache.commons.io.FileUtils; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebElement; import org.testng.annotations.Test; import org.openqa.selenium.* ; import java.awt.Rectangle; import java.awt.Robot; import

java+selenium——鼠标悬停从一个位置移动到另外一个位置

点点圈 提交于 2021-01-20 10:58:24
package rjcs; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.List; import org.apache.commons.io.FileUtils; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.testng.annotations.Test; import java.awt.Rectangle; import java.awt.Robot; import java.awt.Toolkit; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; import org.openqa