great-tables
great-tables copied to clipboard
Allow custom web driver (options) when saving
Prework
- [x] Read and abide by the great_tables code of conduct and contributing guidelines.
- [x] Search for duplicates among the existing issues (both open and closed).
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 likewdriver(options=wd_options)
that is created here in thesave
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 :)