vbaselenium-webdriverms-access-2016

Unable to extract complete page source using selenium


I am using VBA Selenium for data extraction. My code is extracting the page source but is ignoring data within script tags. How to resolve this issue?

My current code:

Dim d As WebDriver
Set d = New ChromeDriver
d.Start "Chrome"
d.get "https://www.bloomingdales.com/shop/product/french-connection-ennis-satin-bell-sleeve-mini-dress?ID=5250376&CategoryID=21683"
inputString = d.PageSource

Above code is extracting everything in source but ignoring following data

 <script>window.__INITIAL_STATE__={"envProps":
"traits":{"colors":{"selectedColor":2877902},"sizes":{"selectedSize":0}}

basically what i want is to extract all selectedsize values.


Solution

  • Above suggestion from Mr.browsermator resolve my issue.Now i am using following code and data is visible properly.

    initialstate = d.ExecuteScript("return JSON.stringify(window.__INITIAL_STATE__);")