Pickling Selenium Webdriver Objects

前端 未结 2 1451
轻奢々
轻奢々 2021-02-15 23:48

I want to serialize and store a selenium webdriver object so then I could use it later elsewhere in my code. I\'m trying to use pickle to do this. If there is another way to sav

2条回答
  •  日久生厌
    2021-02-16 00:23

    As far as i know from using Protractor\C# architectures:

    Basic usage can be deceiving, meaning when using ChromeDriver in C# you get a mask of all the fuss behind the scenes BUT declaring and initializing a webDriver creates and start a 'server' (in Protractor it's done manually). The webDriver uses some of this server's abilities and states.

    I think of the webDriver not as an object but as an API. The representation of this API as an object is for the ease of use, so I beleave what you ask for is not possible.

提交回复
热议问题