Skip to content

Commit 343f36c

Browse files
committed
Update example tests
1 parent f1cd26e commit 343f36c

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

examples/raw_parameter_script.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@
117117
sb.proxy_string = None
118118
sb.proxy_bypass_list = None
119119
sb.proxy_pac_url = None
120+
sb._swiftshader = False
120121
sb.multi_proxy = False
121-
sb.swiftshader = False
122122
sb.ad_block_on = False
123123
sb.highlights = None
124124
sb.interval = None

examples/test_chromedriver.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""This test is only for Chrome!
22
(Verify that your chromedriver is compatible with your version of Chrome.)"""
33
import colorama
4+
import sys
45
from seleniumbase import BaseCase
56
BaseCase.main(__name__, __file__)
67

@@ -15,7 +16,13 @@ def test_chromedriver_matches_chrome(self):
1516
major_chrome_version = chrome_version.split(".")[0]
1617
chromedriver_version = self.get_chromedriver_version()
1718
major_chromedriver_version = chromedriver_version.split(".")[0]
18-
colorama.init(autoreset=True)
19+
if (
20+
"win32" in sys.platform
21+
and hasattr(colorama, "just_fix_windows_console")
22+
):
23+
colorama.just_fix_windows_console()
24+
else:
25+
colorama.init(autoreset=True)
1926
c1 = colorama.Fore.BLUE + colorama.Back.LIGHTCYAN_EX
2027
c2 = colorama.Fore.BLUE + colorama.Back.LIGHTGREEN_EX
2128
c3 = colorama.Fore.BLUE + colorama.Back.LIGHTYELLOW_EX

examples/translations/dutch_test_1.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
class MijnTestklasse(Testgeval):
77
def test_voorbeeld_1(self):
88
self.openen("https://nl.wikipedia.org/wiki/Hoofdpagina")
9-
self.controleren_element('a[title*="hoofdpagina gaan"]')
9+
self.controleren_element('a[title*="Welkom voor nieuwkomers"]')
1010
self.controleren_tekst("Welkom op Wikipedia", "td.hp-welkom")
11-
self.typ("#searchInput", "Stroopwafel")
12-
self.klik("#searchButton")
11+
self.typ("#searchform input", "Stroopwafel")
12+
self.klik("#searchform button")
1313
self.controleren_tekst("Stroopwafel", "#firstHeading")
1414
self.controleren_element('img[src*="Stroopwafels"]')
15-
self.typ("#searchInput", "Rijksmuseum Amsterdam")
16-
self.klik("#searchButton")
15+
self.typ("#searchform input", "Rijksmuseum Amsterdam")
16+
self.klik("#searchform button")
1717
self.controleren_tekst("Rijksmuseum", "#firstHeading")
1818
self.controleren_element('img[src*="Rijksmuseum"]')
1919
self.terug()

0 commit comments

Comments
 (0)