Setting sensors (location) in headless Chrome
问题 Is it possible to set custom location coordinates with Chrome Headless? I can't find it in the Devtools protocol API. Is there a workaround available? 回答1: I googled it and got many methods. I try one by one, almost all of them turn out outdated. Then I find out a solution, use chrome devtools protocol to achieve that. The small example code below, that it uses the most common tool selenium to execute chrome devtools protocol command. import time from selenium.webdriver import Chrome,