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.
1.4m articles
1.4m replys
5 comments
57.0k users