Mozilla Firefox vs Google Chrome in Selenium in python speed test.

Test:

Test for Google Chrome:-

from selenium import webdriver
start = time.time()
options = webdriver.ChromeOptions()
options.add_argument("--headless")
options.add_argument('--ignore-certificate-errors')
options.add_argument("disable-gpu")
options.add_argument('--proxy-server=%s' % PROXY) PROXY = "socks5://localhost:9050"
driver = webdriver.Chrome("G:\\software\\
   chromedriver.exe",options =options)

driver.get('https://www.youtube.com/?gl=IN&tab=w1')
print (driver.title)
driver.quit()

end = time.time()
print(f"Time {end - start}")

Test for Mozilla Firefox:-
from selenium import webdriver
start = time.time()

PROXY = "socks5://localhost:9050"
options = webdriver.FirefoxOptions()

options.add_argument("--headless")
options.add_argument('--ignore-certificate-errors')
 options.add_argument("disable-gpu")
 options.add_argument('--proxy-server=%s' % PROXY)

 driver = 
     webdriver.Firefox(executable_path=
         "G:\software\geckodriver.exe",options=options)

 driver.get('https://www.youtube.com/?gl=IN&tab=w1')
 print (driver.title)
 driver.quit()

 end = time.time()
 print(f"Time {end - start}")

Result:-

Mozilla Firefox:-

Time 13.406760215759277
Time 10.54478645324707
Time 10.78819751739502
Time 10.710049152374268

Google Chrome:-

Time 11.220170259475708
Time 11.3348548412323
Time 11.265398263931274
Time 11.256144523620605

Mozilla Firefox is fast compared to Google Chrome. And it consumes less memory compare to Google Chrome.
-----------------------------------------------------------------------------

This blog show's you:-

1) Compare between Mozilla Firefox and Google Chrome which is best.
2) Which browser is fast in Selenium.
3) Comparing Mozilla Firefox and Google Chrome in Selenium.
4) Comparing Mozilla Firefox and Google Chrome in Selenium using tor and headless.
5) The best browser to use in Selenium.
6) webdriver firefox.
7) how to use Google Chrome and Mozilla Firefox in Selenium.
8) Comparing speed in headless browser in Selenium.



















Comments

Popular posts from this blog

Android Studio 3.5 or above usb device not detected in Android Studio or Unable to detect adb version, exit value: 0xc0000135. ADB depends on the Windows Universal C Runtime, which is usually installed by default via Windows Update. You may need to manually fetch and install the runtime package here: https://support.microsoft.com/en-ca/help/2999226/update-for-universal-c-runtime-in-windows

Lint found fatal errors while assembling a release target.

ViewModelProviders.of(this) is deprecated what to use instead ViewModelProviders.of(this) OR if you don't want to use ViewmodelFactory OR ViewModelProviders error.