Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

97
Views
Browser JS: Switch execution context to page script

I know what concrete result I want, but what precisely what I want to do is an unknown to me, so forgive me if the title is incorrect.

Essentially, I want to invoke a function in a page's scripts. Here's an example.

  • The page is https://www.anthem.com/provider/policies/clinical-guidelines/updates/?cnslocale=en_US_ga
  • This page loads https://www.anthem.com/assets/scripts/scripts.js?07152022
  • This script has the function getProviderMPForms which is used to fetch the data for the page

I want to call this function directly, from the context of the web console (actually running in Selenium, but basically the web console). Is this even possible? I've looked up something along the lines of switching context, but I'm not even certain what the precise problem I'm facing is.

The browser is Chrome, but ideally the solution only depends on browser-agnostic JS.

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!