Selenium grid not working without chromedriver local install

Selenium grid not working without chromedriver local install



I ran the following commands to get my selenium grid / hub up and running:



hub: java -jar selenium-server-standalone-3.14.0.jar -role hub


java -jar selenium-server-standalone-3.14.0.jar -role hub



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


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



when I check the hub console, I see that my webdriver is registered, and ready to use...



I connected to the hub via:


driver = webdriver.Remote(
command_executor='http://localhost:4444/wd/hub',
desired_capabilities=DesiredCapabilities.CHROME)



and it connects fine...however, if i don't have chromedriver (like if I was to do it w/o grid) downloaded and installed in $PATH, the application fails.



Is this normal? I was under the impression, the whole point of selenium-grid and all this remote logic was to ensure that the individual drivers don't need to be installed on the "client" machine.





Normal. You don’t need $PATH if selenium jar and drivers in the same folder as I remember
– sers
Aug 24 at 14:28





@sers so is my logic incorrect? " I was under the impression, the whole point of selenium-grid and all this remote logic was to ensure that the individual drivers don't need to be installed on the "client" machine"
– nate
Aug 24 at 15:17




2 Answers
2



yes its mandatory to install browser and its compatible driver on client machine
Below image will clear how it works
enter image description here



Selenium don't controls browser, driver do. Selenium with hub role is server and balancer to selenium with node role, and node speaks with driver.
You need selenium jar and drivers on each client machine which will speaks with hub.



How it works with hub:


⇄ node ⇄ driver ⇄ browser (same machine)
code ⇄ hub ⇄ node ⇄ driver ⇄ browser (another machine)
⇄ node ⇄ driver ⇄ browser (another machine)





thanks so much for your help! So if i understand correctly, Host A: Contains Hub, Server 1,2,3: Nodes My PC: NightwatchJS / selenium.py etc etc. My PC connects to hub, which in turn speak to the nodes on server 1,2,3. and the nodes are the ones doing all the heavy lifting... But my PC needs the chromedriver? (chromedriver.chromium.org/downloads)
– nate
Aug 24 at 22:15





If your PC is not node or you don't run test locally without hub then your PC not need driver. Server 1,2,3 need driver and selenium runs as node and connected to the hub. Also Host A can be both hub and node
– sers
Aug 24 at 22:20





Ah that explains it, cheers mate!
– nate
Aug 24 at 22:36






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

ャフサォクコ ケウ,コ,ワ メ,ロスョノ゙,クネ,フムカヤヲニ,エコ゚ツ ウイオン゙ケワサネォキモュキォウイノンコチ゚メヌナイゥフュ,カヒウネェ ネ,ホノケ,ムュキ ッボーミュハ,チ ツス ィ メウイマヤ,゙ウチ ヅ ロ,ォジヌェ ャヌット ェ,マャ,チナエヒネソキツテ トホヲヲミーァ

Node.js puppeteer - Use values from array in a loop to cycle through pages