File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 5
5
from selenium .webdriver .common .by import By
6
6
7
7
8
-
9
-
10
8
def test_callback (sample_app , start_app ):
11
-
12
9
# Start the app in another thread
13
10
start_app (sample_app )
14
11
15
- driver = webdriver .Chrome ()
12
+ options = webdriver .ChromeOptions ()
13
+ options .add_argument ("--headless" )
14
+ driver = webdriver .Chrome (options = options )
16
15
driver .get ("http://127.0.0.1:5000" )
17
16
18
17
# Set text in the input with id "input_sample"
@@ -21,8 +20,10 @@ def test_callback(sample_app, start_app):
21
20
time .sleep (2 )
22
21
23
22
# Check that it is showing up as the graph title
24
- graph = driver .find_element (By .ID , "graph-component-sample" ).find_element (By .CLASS_NAME , "g-gtitle" )
23
+ graph = driver .find_element (By .ID , "graph-component-sample" ).find_element (
24
+ By .CLASS_NAME , "g-gtitle"
25
+ )
25
26
assert graph .text == "Hello, world!!"
26
27
27
28
# Close the driver
28
- driver .quit ()
29
+ driver .quit ()
You can’t perform that action at this time.
0 commit comments