File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -48,15 +48,15 @@ def test_swag_labs_basic_flow(self):
48
48
49
49
# Checkout - Add info
50
50
self .click ("link=CHECKOUT" )
51
- self .assert_exact_text ("Checkout: Your Information" , "div.subheader" )
51
+ self .assert_text ("Checkout: Your Information" , "div.subheader" )
52
52
self .assert_element ("a.cart_cancel_link" )
53
53
self .type ("#first-name" , "SeleniumBase" )
54
54
self .type ("#last-name" , "Rocks" )
55
55
self .type ("#postal-code" , "01720" )
56
56
57
57
# Checkout - Overview
58
58
self .click ("input.btn_primary" )
59
- self .assert_exact_text ("Checkout: Overview" , "div.subheader" )
59
+ self .assert_text ("Checkout: Overview" , "div.subheader" )
60
60
self .assert_element ("link=CANCEL" )
61
61
self .assert_text (item_name , "div.inventory_item_name" )
62
62
self .assert_text (item_price , "div.inventory_item_price" )
Original file line number Diff line number Diff line change
1
+ """ Testing the self.choose_file() method. """
2
+
1
3
import os
2
4
from seleniumbase import BaseCase
3
5
4
6
5
7
class FileUploadButtonTests (BaseCase ):
6
8
7
- """ The main purpose of this is to test the self.choose_file() method. """
8
-
9
9
def test_file_upload_button (self ):
10
10
self .open ("https://www.w3schools.com/jsref/tryit.asp"
11
11
"?filename=tryjsref_fileupload_get" )
@@ -15,7 +15,7 @@ def test_file_upload_button(self):
15
15
self .add_css_style (zoom_in )
16
16
self .highlight ('input[type="file"]' )
17
17
dir_name = os .path .dirname (os .path .abspath (__file__ ))
18
- file_path = dir_name + "/ example_logs/screenshot.png"
18
+ file_path = os . path . join ( dir_name , " example_logs/screenshot.png")
19
19
self .choose_file ('input[type="file"]' , file_path )
20
20
self .demo_mode = True # Adds highlighting to the assert statement
21
21
self .assert_element ('input[type="file"]' )
You can’t perform that action at this time.
0 commit comments