3
3
from selenium .webdriver import Firefox
4
4
5
5
from modules .page_object import AboutPrefs
6
- from modules .util import BrowserActions
6
+ from modules .util import BrowserActions , Utilities
7
7
8
8
9
9
def test_language_pack_install_about_preferences (driver : Firefox ):
@@ -12,18 +12,32 @@ def test_language_pack_install_about_preferences(driver: Firefox):
12
12
"""
13
13
about_prefs = AboutPrefs (driver , category = "general" ).open ()
14
14
ba = BrowserActions (driver )
15
+ util = Utilities ()
15
16
about_prefs .get_element ("language-set-alternatives-button" ).click ()
16
17
17
18
iframe = about_prefs .get_element ("browser-popup" )
18
19
ba .switch_to_iframe_context (iframe )
19
- about_prefs .get_element ("language-set-alternatives-popup-select-lanuages" ).click ()
20
+ about_prefs .get_element ("language-set-alternatives-popup-select-language" ).click ()
21
+
20
22
about_prefs .element_clickable (
21
- "language-set-alternatives-popup-select-lanuages-search-more"
23
+ "language-set-alternatives-popup-select-language-search-more"
24
+ )
25
+
26
+ more_languages_option = about_prefs .get_element (
27
+ "language-set-alternatives-popup-select-language-search-more"
22
28
)
23
29
24
- with driver .context (driver .CONTEXT_CHROME ):
25
- select_more = about_prefs .get_element (
26
- "language-set-alternatives-popup-select-lanuages-search-more"
27
- )
28
- select_more .click ()
30
+ about_prefs .double_click (more_languages_option )
29
31
sleep (10 )
32
+
33
+ about_prefs .custom_wait (timeout = 20 ).until (
34
+ lambda _ : about_prefs .get_element (
35
+ "language-set-alternatives-popup-select-language"
36
+ ).get_attribute ("label" )
37
+ == "Select a language to add…"
38
+ )
39
+
40
+ about_prefs .get_element ("language-set-alternatives-popup-select-language" ).click ()
41
+
42
+ util .write_html_content ("contents" , driver , False )
43
+ util .write_html_content ("contentschrome" , driver , True )
0 commit comments