python - Multiple Selenium instances on same machine? -


what best way run multiple selenium instances in parallel if tests for:

  1. same browser type
  2. same machine

i've read this: https://code.google.com/p/selenium/wiki/scalingwebdriver , seems there systemic problem regarding running multiple selenium instances on same machine. i'd ask community if there way i'm not seeing.

i have working selenium instance run e2e tests. however, run 5 of selenium instances in parallel using same browser type.

i've looked selenium grid 2 , i'm not sure if fits use case. seems main point of selenium grid 2 able distribute test according browser version / operating system. in case, each test same type, same browser version.

running standalone test works great!

running multiple firefox processes:

but try scale spawning multiple firefox processes, errors involve http , requests error, including badclient , statuserror , exception: request cannot sent:

webdriver.firefox()

using grid

i've dug webdriver.firefox() code , looks under scenes, it's connecting locally:

class webdriver(remotewebdriver): def __init__(self, firefox_profile=none, firefox_binary=none, timeout=30, capabilities=none, proxy=none): ... remotewebdriver.__init__(self, command_executor=extensionconnection("127.0.0.1", self.profile, self.binary, timeout))

the remotewebdriver instance seems connect localhost on free port finds. seems same command used grid when registering node:

java -jar selenium-server-standalone-2.44.0.jar -role node -hub http://localhost:4444/grid/register

does grid have relevance running parallel selenium instances on same machine? or load balancer instances running on various different machines?

is possible have reliable, non-flaky instances of selenium run in parallel on ​same​ machine? http flakiness when run them in parallel (lots of request cannot sent or bad status error or browser closing before info can read socket)

what's point of selenium grid 2? act load balancer parallel test runs on multiple machines? if ran grid locally hub , node on same machine (all ff), same me running multiple webdriver.firefox() processes?

or there more magic behind scenes?


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -