我在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)
吗?