Skip to content

Ferrum needs to listen DOM.documentUpdated in order to use NodeId values properly #86

Description

@betelgeuse

https://chromedevtools.github.io/devtools-protocol/tot/DOM/#event-documentUpdated

Problem

Since ferrum tracks node ids in frontend but does not listen to DOM.documentUpdated it's possible that the following sequence of events happens:

  1. Ferrum::Node has node_id in memory
  2. DOM.documentUpdated happens
  3. calling methods on the node returns information for a new node that has matching id
    1. this would happen because they seem to start again from zero so they are not unique during single session

Fix

Make all Node objects listen to DOM.documentUpdated after which the objects should become stale so that all new commands issued with the node raise an exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions