0

I have multiple nodes and few of them are same OS and Browser combinations(I had it like that some reason).

Now, How do I differentiate on which node to run in my code

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

remote driver above will run Chrome browser machine

  wd = webdriver.Remote(command_executor = 'http://127.0.0.1:4444/wd/hub',desired_capabilities=DesiredCapabilities.FIREFOX)

remote driver above will run Firefox machine

what if I have another machine with same browser and I want my another test run on that machine.

How do I differentiate?

Prakash.AI
  • 111
  • 1
  • 11

1 Answers1

0

The selenium grid determines for you which node is available, and runs it on that node, you don't do this yourself. If your grid has two nodes available, both having a firefox browsers attached, then either one of them can be used. This is the whole point of the grid.

Mobrockers
  • 2,128
  • 1
  • 16
  • 28
  • can I explicitly ask Grid to which one to choose when having same browser combinations? by desired capabilities or something?? – Prakash.AI Jul 11 '16 at 09:43
  • This plugin provides a way to explicitly choose a node via labels, I do not know how this works in pure selenium but it must be possible. https://wiki.jenkins-ci.org/display/JENKINS/Selenium+Plugin – Mobrockers Jul 11 '16 at 14:10
  • Even I know that from kawaguchi's presentation but I also couldn't figure out how to differentiate by label – Prakash.AI Jul 12 '16 at 14:28
  • I'm not sure what you're trying to say here. – Mobrockers Jul 12 '16 at 14:56
  • @motobrockers I mean to say that , even I came across the selenium plugin but could not understand the way to explicitly choose a node via labels. – Prakash.AI Jul 13 '16 at 05:44