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

Error:java.lang.IllegalArgumentException: The style on this component requires your app theme to be Theme.MaterialComponents (or a descendant). at com.google.android.material.internal.ThemeEnforcement.checkTheme(ThemeEnforcement.java:240) at com.google.android.material.internal.ThemeEnforcement.checkMaterialTheme(ThemeEnforcement.java:215) at com.google.android.material.internal.ThemeEnforcement.checkCompatibleTheme(ThemeEnforcement.java:143) at com.google.android.material.internal.ThemeEnforcement.obtainStyledAttributes(ThemeEnforcement.java:78) at com.google.android.material.chip.ChipDrawable.loadFromAttributes(ChipDrawable.java:359) at com.google.android.material.chip.ChipDrawable.createFromAttributes(ChipDrawable.java:292) at com.google.android.material.chip.Chip.(Chip.java:193) at com.google.android.material.chip.Chip.(Chip.java:186) at com.google.android.material.chip.Chip.(Chip.java:182) at com.demo.nspl.restaurantlite.Navigation_Drawer.SalesFragment.getFilterChip(SalesFragment.java:158) at com.demo.nspl.restaurantlite.Navigation_Drawer.SalesFragment.lambda$onCreateView$0(SalesFragment.java:71) at com.demo.nspl.restaurantlite.Navigation_Drawer.-$$Lambda$SalesFragment$KCm-iiczjdYbpiNmaNw12gtFOoQ.onClick(lambda) at android.view.View.performClick(View.java:5268) at android.view.View$PerformClick.run(View.java:21550) at android.os.Handler.handleCallback(Handler.java:822) at android.os.Handler.dispatchMessage(Handler.java:104) at android.os.Looper.loop(Looper.java:207) at android.app.ActivityThread.main(ActivityThread.java:5811) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:681)

Configuration 'androidTestCompile' is obsolete and has been replaced with 'androidTestImplementation' and 'androidTestApi'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html Configuration 'androidTestApi' is obsolete and has been replaced with 'androidTestImplementation'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation' and 'testApi'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html Configuration 'testApi' is obsolete and has been replaced with 'testImplementation'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html