Skip to content

EventFiringWebDriver: does not wrap elements in executeScript result #3380

Closed
@mfulton26

Description

@mfulton26

Meta -

OS: Windows 10

Selenium Version: 3.0.1

Browser: n/a

Browser Version: n/a

Expected Behavior -

Executing a script (synchronous or asynchronous) that returns a WebElement or an object containing one or more WebElement instances should wrap those WebElement instances in EventFiringWebElement instances and return a result object containing it/them.

Actual Behavior -

executeScript and executeAsyncScript pass their result object through without transforming WebElement instances to EventFiringWebElement instances.

Steps to reproduce -

val result = eventFiringWebDriver.executeScript("return [document.head, document.body];")
result as List<*>
check(result.all { element ->
    element as WebElement
    element.javaClass.simpleName == "EventFiringWebElement"
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-javaJava Bindings

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions