Chartify:如何传递 Selenium WebDriver?
Chartify: how to pass a Selenium WebDriver?
下面的例子应该可行,但它需要 selenium
包(据我所知,在后台 chartify
使用 bokeh
包构建交互式图表并截取屏幕截图selenium
)
import chartify
chartify.examples.plot_scatter()
上面的代码不起作用,因为我无法为 Selenium 配置驱动程序,这通常与此类似:
from selenium import webdriver
driver = webdriver.Chrome(executable_path=(my_path + '/chromedriver)')
如何将此 driver
对象传递给 chartify
?
看起来他们已经在 Chart 方法中硬编码了 webdriver 的创建和配置 _initialize_webdriver
。
如果你想要一些不同于他们所做的东西,我认为猴子修补 Chart. _initialize_webdriver
方法来覆盖它是当前唯一的选择。可能值得在他们的 GH 跟踪器上打开一个问题来讨论添加自定义 webdriver 创建的能力。
下面的例子应该可行,但它需要 selenium
包(据我所知,在后台 chartify
使用 bokeh
包构建交互式图表并截取屏幕截图selenium
)
import chartify
chartify.examples.plot_scatter()
上面的代码不起作用,因为我无法为 Selenium 配置驱动程序,这通常与此类似:
from selenium import webdriver
driver = webdriver.Chrome(executable_path=(my_path + '/chromedriver)')
如何将此 driver
对象传递给 chartify
?
看起来他们已经在 Chart 方法中硬编码了 webdriver 的创建和配置 _initialize_webdriver
。
如果你想要一些不同于他们所做的东西,我认为猴子修补 Chart. _initialize_webdriver
方法来覆盖它是当前唯一的选择。可能值得在他们的 GH 跟踪器上打开一个问题来讨论添加自定义 webdriver 创建的能力。