I want convert dict to json using json.dumps but i have problem with WebElement.
I got TypeError: Object of type WebElement is not JSON serializable
TypeError: Object of type WebElement is not JSON serializable
This my example code :
def x(): p = {'a':'a','b':driver.find_element(By.XPATH, xpath)} return p dict = x() print(json.dumps(dict))
I want convert json except WebElement but without modify x function.
2.1m questions
2.1m answers
60 comments
57.0k users