selene icon indicating copy to clipboard operation
selene copied to clipboard

should we kill/reset driver of shared.config each time we change shared.config properties?

Open yashaka opened this issue 3 years ago • 2 comments

should we kill current driver if browser_name is changed? (now it's killed on next driver ask) or should we open one more? so afterwards the user can switch... what about making such "mode" also configurable? ;)

consider deprecating changing props like timeout after driver was created make driver be recreated in such cases but again... what about making this configurable too? as a "mode"...

yashaka avatar Oct 09 '22 18:10 yashaka

    # in the past we forced browser to restart
    # if the config.browser_name was changed to a new version...
    # now we removed this to keep things KISS
    # and potentially less conflict with e.g. Appium...
    # we also checked browser session_id ... why?
    # if stored and \
    #       stored.session_id and \
    #       stored.name == self.browser_name:
    #     return stored

yashaka avatar Oct 09 '22 18:10 yashaka

I think we should, yes, cause it's hard to test after changing config a bit without reset. It needs to close driver and open initialize it again now. But! Then should check necessary properties were set up when each change used. It should be clear for users what is default config of shared browser is.

aleksandr-kotlyar avatar Oct 11 '22 18:10 aleksandr-kotlyar