Skip to content

execut_script() TypeError:Object of type Element is not json serializable #26

@lileeves

Description

@lileeves

申明一个元素
class xxPage(Page):
xxbtn = Element(xpath="~~~~~")
在测试类中:
class TestXX:
def test_xxpage(browser):
page = xxPage(broeser)
page.execut_script("arguments[0].click()", page.xxbtn)
在selenium 中都可以通过 driver.execut_script("arguments[0].click()", xxbtn) 执行,但是poium 报错TypeError:Object of type Element is not json serializable,是什么问题呢?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions