Interceptor not able to connect to Postman when using chromedriver

I am trying to run a selenium-webdriver test and capture the API requests it generates using Postman + Interceptor. I am not able to use selenium-wire for this as the actual test is written using protractor and the issue is seen there as well.
Here’s the code:

 import os
 import time
 from selenium import webdriver
 from selenium.webdriver.chrome.options import Options


 executable_path = "./chromedriver"
 interceptor_crx_path = "./Postman Interceptor 1.1.2.0.crx"

 os.environ["webdriver.chrome.driver"] = executable_path
 chrome_options = Options()
 chrome_options.add_extension(interceptor_crx_path)

 driver = webdriver.Chrome(executable_path=executable_path, chrome_options=chrome_options)
 driver.get("http://stackoverflow.com")
 time.sleep(180)
 driver.quit()

Although the interceptor extension gets added to Chrome, but it’s not able to connect to Postman.
I have verified that the extension id matches aicmkgpgakddgnaphhhpliifpcfhicfo
If I do not use chromedriver (ie start Chrome normally) then its able to connect successfully.
What am I doing wrong?

1 Like