Mohsen Mohsen - 1 year ago 117
AngularJS Question

Get instance ID when running multiCapabilities in Protractor

I'm using multiCapabilities with Protractor. Is there any way to get the instance ID that my tests is running on. I need this because I want each browser sign in with a different account.

Answer Source

Apparently it is not possible per this GitHub ticket.

What I did was using a buffer JSON file for keeping my configs per capability and use fs to read from it in onPrepare method that runs per capability. I mark each set of params that is used in the file again to avoid using the same set of params again. This way each capability can sign in with a different user name.

It was very manual but worked!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download