great-tables icon indicating copy to clipboard operation
great-tables copied to clipboard

Allow custom web driver (options) when saving

Open minimav opened this issue 6 months ago • 0 comments

Prework

Proposal

When saving a table currently the options for the the web driver that selenium uses are strings found here, for which some default options are set within the save function. In some situations it is helpful to allow further customisation of the web driver e.g. I was trying to save a table from within a Docker container where even with a browser installed in the Docker image correctly (Chrome in my case), I needed to add extra web driver options in order to get saving to work.

There are a couple of ways in which you could add such functionality:

  • Allow the user to pass an instantiated web driver via the web_driver kwarg alongside the current string options which result in the default options being used, i.e. pass in an object like wdriver(options=wd_options) that is created here in the save function
  • Add a separate kwarg for additional web driver options that would get added to the web driver options like is already done for the default options wd_options.add_argument(...)

There will likely be other ways of achieving the same outcome too.

I'd be happy to work on a PR for this if you think this is a good addition. Cheers :)

minimav avatar Aug 11 '24 12:08 minimav