dimanche 12 avril 2015

Run Selenium Grid under Multiple Windows User Accounts?

I'm using Selenium Grid (RemoteWebDriver) to connect to a remote server (Grid) from a hub. I know how to connect from a hub to a grid.


I have multiple windows user accounts setup on a remote windows server (such as "account639", "account729", "account889" etc) and I want my hub to connect to each server separately. First, I understand each user will need to be logged onto the user account - otherwise I will not be able to connect.


I need to repeat a specific section of code under multiple windows user accounts on the same server. For example, let's say I want to sign up for an email account using Selenium, I want to repeat this step under 10 different windows user accounts.


My concern is, however, how do I specify which windows user account the code should be executed on in the Grid server?


The only parameter I see is to add the host name (or IP) and the port in the hub. And since the host name is the same for all windows user accounts under this server how would I tell the "hub" on which user account to execute the code?


The only way I see to differentiate between two windows user accounts is by listening on a different port for each account.


Using this method, I would setup "account639" to listen on port 6399 for example and "account729" to listen on port "7299" for example - this way I know the code is being executed under the appropriate windows account.


Will this solution work? And is there a more straightforward (I.e, direct) way of doing this without using ports?


Thanks


Aucun commentaire:

Enregistrer un commentaire