是否有必要在无头铬模式下关闭浏览器?

时间:2018-06-14 19:49:33

标签: selenium-chromedriver

我在Ruby中使用Watir gem,我想知道我是否这样做:

writer = pd.ExcelWriter('pandas_with_rich_strings.xlsx', engine='xlsxwriter')
workbook = xlsxwriter.Workbook('pandas_with_rich_strings.xlsx')
worksheet = workbook.add_worksheet('pandas_df')
df.to_excel(writer,'pandas_df')
writer.save()

(注意无头模式)

我最后必须做args = %w[--disable-extensions --headless window-size=1600,1200 --no-sandbox --disable-gpu"] options = { binary: ENV['GOOGLE_CHROME_BIN'], prefs: { password_manager_enable: false, credentials_enable_service: false }, args: args } browser = Watir::Browser.new(:chrome, options: options) 吗?

0 个答案:

没有答案