Chrome & Firefox on Windows vs Linux (selenium)
Asked Answered
E

1

4

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?

Esotropia answered 22/12, 2017 at 9:53 Comment(3)
Hello I’m facing the same situation. Have you switched to Linux container? How it’s going? Have you found any discrepancy between windows and linux?Gillian
@gary.zhangyes we are in the process of switching to Docker and have found it much easier to manage browser versioning and server performance. We took the decision to presume there is no difference in the platform and we've not seen an issue in docker that we couldn't replicate on windows. It's worth noting however that docker only supports Chrome/Firefox so if you want to test IE/Edge you will need the existing infrastructure or cloud-based alternative, we're running a hybrid system.Esotropia
Glad to hear that. Thanks for the reply.Gillian
M
2

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

  • 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 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 / and 32 / 64 bit) to install the Browser as per underlying OS Architecture.

Though the install location and directory structure may vary within the , 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.

Hence, from Selenium's 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

Mydriasis answered 22/12, 2017 at 10:15 Comment(2)
Hi thanks for your answer, I was more interested in the browsers themselves than selenium. for example if something is rendered one was on chrome on windows will it be the same on chrome on Linux. The vast majority of our customers use windows however the efficiency savings of Linux is high that if there are no major differences then testing on Linux rather than windows will be an acceptable risk.Esotropia
Checkout my updated answer and let me know if any counter questions.Mydriasis

© 2022 - 2024 — McMap. All rights reserved.