Chrome & Firefox on Windows vs Linux (selenium)

ぃ、小莉子 提交于 2019-11-26 21:54:06

问题


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

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

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?


回答1:


Selenium tends to mock the following User Actions :

  • Sending Text : sendKeys("LiamHarries")
  • Special Keyboard Characters : sendKeys(Keys.ENTER) and sendKeys(Keys.RETURN)
  • Mouse Hover : moveToElement(element).perform()
  • Click : click()

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


Update :

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.

Though the Install Location and Directory Structure may vary within the OS Flavors, the release candidate Web Browser 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 the OS Variants.

Hence, from Selenium perspective underlying hardware bears No Impact

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



来源:https://stackoverflow.com/questions/47939389/chrome-firefox-on-windows-vs-linux-selenium

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!