Skip to content

Commit 49bd9fd

Browse files
committed
Update test to run with latest changes from HY's commit
1 parent ff84832 commit 49bd9fd

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

tests/address_bar_and_search/test_google_withads_url_bar_us.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import time
2+
23
import pytest
34
from selenium.webdriver import Firefox
45

56
from modules.browser_object import Navigation
67
from modules.page_object import AboutTelemetry
8+
from modules.page_object_about_config import AboutConfig
79
from modules.util import Utilities
810

911

@@ -21,22 +23,24 @@ def test_google_withads_url_bar_us(driver: Firefox):
2123

2224
# instantiate objects
2325
nav = Navigation(driver).open()
26+
about_config = AboutConfig(driver)
27+
util = Utilities()
28+
29+
# change pref value in order to not display accept cookies banner
30+
about_config.change_pref_value("cookiebanners.service.mode", 1)
31+
2432
nav.search("iphone")
2533
time.sleep(5)
2634
about_telemetry = AboutTelemetry(driver).open()
27-
util = Utilities()
35+
time.sleep(2)
2836

2937
# Click on Raw JSON, switch tab and click on Raw Data
3038
about_telemetry.get_element("category-raw").click()
3139
about_telemetry.switch_tab()
3240
about_telemetry.get_element("rawdata-tab").click()
33-
time.sleep(5)
34-
35-
#Verify the following ping is recorded: ""browser.search.withads.urlbar": { "google:tagged": 1}".
3641

42+
# Verify the following ping is recorded: ""browser.search.withads.urlbar": { "google:tagged": 1}".
3743
json_data = util.decode_url(driver)
3844
assert util.assert_json_value(
39-
json_data,
40-
'$..["browser.search.withads.urlbar"].["google:tagged"]',
41-
1,
45+
json_data, '$..["browser.search.withads.urlbar"].["google:tagged"]', 1
4246
)

0 commit comments

Comments
 (0)