如何以编程方式单击 google 地图图标
How to programmatically click google maps icons
看看这张地图:
当您访问 https://www.hertzcarsales.com/, and click "Change" next to with "Within X miles of Y" dropdown selector. Anyway, I cannot right click on the little H's to inspect with FireBug, and I can't seem to figure out how to access the urls attached to each using watir-webdriver 时会弹出此地图。
当我点击一个 H 时我可以做
b.as(:text,/Visit this Store/).href
但我还是不能全部拿到。
据我所知,我认为你做不到。如果您将地图向下剥离到图钉所在的位置,它们将包含在 Selenium 无法在其中看到的 CANVAS
标签中。
我确实找到了另一种方法来获得你想要的东西。去这里吧,https://www.hertzcarsales.com/locations。单击页面中间的蓝色 "Find a Car Sales Location" 按钮。这将启动基本相同的对话框,除了页面左侧有位置摘要。您可以单击左上角的查看全部link。现在您拥有每个位置的信息,您可以获取您想要的 links。
看看这张地图:
当您访问 https://www.hertzcarsales.com/, and click "Change" next to with "Within X miles of Y" dropdown selector. Anyway, I cannot right click on the little H's to inspect with FireBug, and I can't seem to figure out how to access the urls attached to each using watir-webdriver 时会弹出此地图。
当我点击一个 H 时我可以做
b.as(:text,/Visit this Store/).href
但我还是不能全部拿到。
据我所知,我认为你做不到。如果您将地图向下剥离到图钉所在的位置,它们将包含在 Selenium 无法在其中看到的 CANVAS
标签中。
我确实找到了另一种方法来获得你想要的东西。去这里吧,https://www.hertzcarsales.com/locations。单击页面中间的蓝色 "Find a Car Sales Location" 按钮。这将启动基本相同的对话框,除了页面左侧有位置摘要。您可以单击左上角的查看全部link。现在您拥有每个位置的信息,您可以获取您想要的 links。