铬 &Windows 上的 Firefox 与 Linux(硒) [英] Chrome & Firefox on Windows vs Linux (selenium)

查看:22
本文介绍了铬 &Windows 上的 Firefox 与 Linux(硒)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只在 Windows 机器上运行 Selenium 网格,资源使用率很高.

I'm running Selenium grid with only Windows machines and the resource use is quite high.

我一直在考虑将 Chrome 和 Firefox 放在 docker 容器中以提高效率.

I've been toying with the idea of putting Chrome and Firefox inside docker containers to improve efficiency.

我的问题是,不同平台上的浏览器本身是否存在任何主要差异,即 Windows 上的 Chrome 与 Linux 上的 Chrome 的行为会有所不同,还是它们运行相同的代码并表现相同?

My question is are there any key differences in the browsers themselves on the different platforms, i.e. would Chrome on Windows behave differently to Chrome on Linux or do they run the same code and behave the same?

推荐答案

Selenium 倾向于模拟用户操作,其中一些是:

Selenium tends to mock the User Actions and some among them are:

  • 发送文本:sendKeys("LiamHarries")
  • 特殊键盘字符:sendKeys(Keys.ENTER)sendKeys(Keys.RETURN)
  • 鼠标悬停:moveToElement(element).perform()
  • 点击:click()

所有这些用户操作都独立于底层的硬件配置.因此,如果它们运行相同的代码并且它们的行为相同.

All these User Actions are independent of the underlying os and Hardware Configuration. Hence if they run the same code and they will behave the same.

根据您的评论...如果某些内容在 Windows 上的 chrome 上呈现,它在 Linux 上的 chrome 上是否相同...,值得一提的是新版本的 Web浏览器以不同的格式发布(例如 .tz/.tr/.gz for Linux.zip/.rar for Windows),它们包含所需的组件(单独用于 /32/64 位)以根据底层操作系统架构安装浏览器.

As per your comment ...if something is rendered one was on chrome on windows will it be the same on chrome on Linux..., it is worth to mention when new versions of Web Browsers are published in different formats (e.g. .tz/.tr/.gz for Linux and .zip/.rar for Windows) and they contain the required components (separate for windows / linux and 32 / 64 bit) to install the Browser as per underlying OS Architecture.

虽然安装位置目录结构可能在 ,候选版本 WebDriver 经历了不同的测试程序(例如Alpha 测试Beta 测试em>、UATUX 控制测试),确保用户体验在所有操作系统变体中都是无缝和相似的.

Though the install location and directory structure may vary within the os , the release candidate WebDriver goes through different Testing Procedures (e.g. Alpha Testing, Beta Testing, UAT and UX Control Testing) which does ensures that the User Experience is seamless and similar across all OS Variants.

因此,从 Selenium 的角度来看,底层硬件没有影响

Hence, from Selenium's perspective underlying hardware bears no impact

注意:在早期的 Google Chrome 版本中出现了 Headless Chrome 功能的情况,但这是一个精心策划的后续行动Chrome 发布地图

Note : There have been instances when the Headless Chrome feature was available in early Google Chrome builds but that was a well planned move following the Chrome Release Map

这篇关于铬 &Windows 上的 Firefox 与 Linux(硒)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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