Skip to content

Not able to reset executionContext #616

Description

@manpreet-compro

Use Case:
Perform some action in the iframe and then some action on main document

I referred the documentation https://docs.webpagetest.org/scripting/#setexecutioncontext for switching the execution context and followed the example code

Script:

navigate https://codepen.io/juno_okyo/pen/yOjaEZ
setExecutionContext origin=https://cdpn.io
execAndWait document.getElementById('name-input').value = 'Bob';
execAndWait document.querySelector('button').click();
sleep 2
setExecutionContext
clickAndWait data-test-id=login-button
sleep 10

Expected Action:

  1. Set execution context to of iframe
  2. Type Bob in the input field
  3. Click 'OK' button
  4. Set execution context to main document
  5. Click on 'Login' button in the header

Error Faced
No action captured after resetting the execution context. Results can be referred from https://www.webpagetest.org/result/230517_AiDcJ3_9W6/

Step 4 is not captured at all and there is no data

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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