小编Anu*_*uru的帖子

如何使用 Selenium WebDriver + python 获取浏览器控制台错误消息

控制台错误 png我们一直在尝试使用以下代码打印特定站点的控制台错误。但我们无法捕获控制台错误。任何人都可以快速回复但我们正在得到

代码行:

driver.get_log('browser')
Run Code Online (Sandbox Code Playgroud)

错误 :

[{u'source': u'deprecation', u'message': u"https://xxxxx/static/vendor/vendor.bundle.js?v=16 902 Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.", u'timestamp': 1515593047810, u'level': u'WARNING'}]
Run Code Online (Sandbox Code Playgroud)

代码行:

driver.get_log('driver')
Run Code Online (Sandbox Code Playgroud)

错误 :

[{u'timestamp': 1515593061561, u'message': u'Unable to evaluate script: disconnected: not connected to DevTools\n', u'level': u'WARNING'}, {u'timestamp': 1515593071847, u'message': u'Unable to evaluate script: disconnected: not connected to DevTools\n', u'level': u'WARNING'}]
Run Code Online (Sandbox Code Playgroud)

代码块:

from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities …
Run Code Online (Sandbox Code Playgroud)

python browser logging selenium selenium-chromedriver

4
推荐指数
1
解决办法
1万
查看次数

在grafana仪表板中如何设置警报邮件配置?

  • Grafana 4.0 版

  • 数据源流入数据库

请把我当作初学者。为此,如何在 Grafana 仪表板中设置警报?警报发送到电子邮件。

/etc/grafana/grafana.ini
Run Code Online (Sandbox Code Playgroud)

我写了这样的 SMTP 配置:

[smtp] 
enabled = True
host = localhost:25
user = 
If the password contains # or ; you have to wrap it with trippel 
quotes. Ex """#password;"""
[emails]
welcome_email_on_sign_up = True
Run Code Online (Sandbox Code Playgroud)

当我在 Grafana 仪表板中设置警报时,其显示错误:

template variables are not supported.
Run Code Online (Sandbox Code Playgroud)

influxdb grafana

2
推荐指数
1
解决办法
1万
查看次数