Running a javascript command using powershell

Welcome Forums General PowerShell Q&A Running a javascript command using powershell

Viewing 2 reply threads
  • Author
    Posts
    • #271564
      Hil
      Participant
      Topics: 33
      Replies: 43
      Points: 245
      Rank: Participant

      I am using Powershell with Selenium to launch Chrome browser.

      Now using Google dev tools I am able to run this command “___grecaptcha_cfg.clients[0]” . How do i run this or something similar using Powershell. I basically want to save the output of the command¬† to a variable in Powershell

      Thanksenter image description here

      • This topic was modified 2 weeks, 5 days ago by Hil.
    • #271738
      Senior Moderator
      Topics: 9
      Replies: 1422
      Points: 5,289
      Helping Hand
      Rank: Community MVP

      You can explore the $browser object. There should be some property/method which will give you the data. If its an Internet Explorer COM object, it will be like $browser.document

    • #271741
      Hil
      Participant
      Topics: 33
      Replies: 43
      Points: 245
      Rank: Participant

      You can explore the $browser object. There should be some property/method which will give you the data. If its an Internet Explorer COM object, it will be like $browser.document

      Thanks. Although it does not show.  See https://www.freepik.com/profile/login

      So, I just trying to run the command using powershell. I am not asking to convert the command to powershell.

      I want to call the same javascript command using powershell. I know there are ways to do this, but I not able to get the syntax right.

      • This reply was modified 2 weeks, 4 days ago by Hil.
Viewing 2 reply threads
  • You must be logged in to reply to this topic.