Exception triggered in EventFiringWebDriver when debugging in PyCharm
Looks like PyCharm debug checks if an object has a __len__
attribute:
elif hasattr(v, "__len__")
and the object WebDriver
has no __len__
.
A solution could be (from the link below) to warp with try\catch:
try: if is_numeric_container(type_qualifier, typeName, v): xml_shape = ' shape="%s"' % make_valid_xml_value(str(v.shape)) elif hasattr(v, "__len__") and not is_string(v): try: xml_shape = ' shape="%s"' % make_valid_xml_value("%s" % str(len(v))) except: passexcept KeyError: pass
Please check this track:https://youtrack.jetbrains.com/issue/PY-39954