snapshot-selenium
snapshot-selenium copied to clipboard
Render pyecharts as image via selenium
我将程序部署在服务器后,发现运行make_snapshot提示:DevToolsActivePort file doesn't exist。 通过分析发现,在docker容器root权限下,chrome无法运行,需要在使用selenium调用chromedriver时为其添加参数”—no-sandbox”。 建议在get_chrome_driver函数在添加“—headless”参数的同时,加上上述参数。或者,为get_chrome_driver函数添加关键字参数,让使用者可以自行添加参数。
the make_snapshot needs to create two local files,one rendered by chart,another output of image。 this is because it accepts file path as params only。if it accept file handler, we can...
Resolve ChromeDriver automatically using the chromedriver_py package.
如果用户需要手动指定chromeDriver的路径(就像在selenium里面那样),那么我觉得需要提供一个参数来接收这个路径,并传递给`get_chrome_driver()`函数,在`get_chrome_driver()`中利用提供的路径创建一个service,将这个service和options一起传入`webDrive.Chrome()`中,从而正确配置chromeDriver路径