Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d9b33dc

Browse filesBrowse files
committed
Update Geolocation examples
1 parent c235aac commit d9b33dc
Copy full SHA for d9b33dc

File tree

Expand file treeCollapse file tree

3 files changed

+4
-3
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+4
-3
lines changed

‎examples/cdp_mode/raw_geolocation.py

Copy file name to clipboardExpand all lines: examples/cdp_mode/raw_geolocation.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
def main():
88
url = "https://www.openstreetmap.org/"
99
sb = sb_cdp.Chrome(url, geoloc=(48.87645, 2.26340))
10-
sb.click("span.geolocate")
10+
sb.sleep(2)
11+
sb.click('a[aria-label="Show My Location"]')
1112
sb.assert_url_contains("48.876450/2.263400")
1213
sb.sleep(5)
1314

‎examples/cdp_mode/raw_geolocation_sb.py

Copy file name to clipboardExpand all lines: examples/cdp_mode/raw_geolocation_sb.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
with SB(uc=True, test=True) as sb:
55
url = "https://www.openstreetmap.org/"
66
sb.activate_cdp_mode(url, geoloc=(31.774390, 35.222450))
7-
sb.click("span.geolocate")
7+
sb.click('a[aria-label="Show My Location"]')
88
sb.assert_url_contains("31.774390/35.222450")
99
sb.sleep(5)

‎examples/test_geolocation.py

Copy file name to clipboardExpand all lines: examples/test_geolocation.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def test_geolocation(self):
3838
},
3939
)
4040
self.open("https://www.openstreetmap.org/")
41-
self.click("span.geolocate")
41+
self.click('a[aria-label="Show My Location"]')
4242
self.assert_url_contains("48.876450/2.263400")
4343
self.save_screenshot_to_logs()
4444
if self.headed:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.