Is there an easy way to do this in Python? I have a pytest funcarg defined like so;
def pytest_funcarg__selenium(request):
sel = selenium('10.3.10.154', 5555, '*firefox', 'http://10.3.10.180:8000')
sel.start()
return sel
Which obviously won't work, as I have no means of changing the specified browser in my tests. I mean, I could wrap a dummy class around selenium in this funcarg that loops through a list of browsers, but if a test fails, then it will fail for all browsers, which of course isn't very practical for finding failing browsers.
I also played with the idea of using a decorator on the test function, which would redefine the function once in the module for each browser under a different name, but same result - the funcarg has no way of knowing which browser to use.