Jump to content

How to get the URLs and source codes of all web pages in Google Chrome that has been opened without switching pages?


Recommended Posts

Posted (edited)

How to get the URLs and source codes of all web pages in Google Chrome that has been opened without switching pages?

Tks

#include "wd_core.au3"
Global $sDesiredCapabilities, $sSession
SetupChrome()
_WD_Startup()
$sSession = _WD_CreateSession($sDesiredCapabilities)

;how to get all tabs url and source text???


Func SetupChrome()
    _WD_Option('Driver', 'chromedriver.exe')
    _WD_Option('Port', 9515)
    _WD_Option('DriverParams', '--verbose --log-path="' & @ScriptDir & '\chrome.log"')
    $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"debuggerAddress": "localhost:9222"}}}}'
EndFunc   ;==>SetupChrome

 

Edited by haijie1223
  • haijie1223 changed the title to How to get the URLs and source codes of all web pages in Google Chrome that has been opened without switching pages?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...