sclevine / agouti

A WebDriver client and acceptance testing library for Go
MIT License
821 stars 103 forks source link

Add an ability to set custom capabilities #176

Closed jurgelenas closed 5 years ago

jurgelenas commented 5 years ago

I had to set a custom vendor specific capability with custom WebDriver.

sclevine commented 5 years ago

Capabilities is just a map[string]interface{}. You can set custom capabilities with:

myCapabilities["customKey"] = "value"
jurgelenas commented 5 years ago

Capabilities is just a map[string]interface{}. You can set custom capabilities with:

myCapabilities["customKey"] = "value"

That is correct. But with my PR you can chain capabilities changes:

capabilities := agouti.NewCapabilities().Browser("firefox").Without("javascriptEnabled").Capability("key", "value")

If you think that modifying map directly is sufficient solution feel free to close my PR :)

sclevine commented 5 years ago

Merged #187 (prefer Set to Capability).