File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 1+ from seleniumbase import BaseCase
2+
3+
4+ class FileUploadButtonTests (BaseCase ):
5+
6+ """ The main purpose of this is to test the self.choose_file() method. """
7+
8+ def test_file_upload_button (self ):
9+ self .open ("https://www.w3schools.com/jsref/tryit.asp"
10+ "?filename=tryjsref_fileupload_get" )
11+ self .wait_for_element ('[id*="google_ads"]' )
12+ self .remove_elements ('[id*="google_ads"]' )
13+ self .switch_to_frame ('iframeResult' )
14+ self .add_css_style (
15+ 'input[type="file"]{zoom: 1.5;-moz-transform: scale(1.5);}' )
16+ self .highlight ('input[type="file"]' )
17+ self .choose_file ('input[type="file"]' , "example_logs/screenshot.png" )
18+ self .demo_mode = True # Adds highlighting to the assert statement
19+ self .assert_element ('input[type="file"]' )
You can’t perform that action at this time.
0 commit comments