Skip to content

Commit

Permalink
[rb] don't use tempfile for use outside of the executing code
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Jul 15, 2020
1 parent 39e03c8 commit a8fd30b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions rb/spec/integration/selenium/webdriver/element_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,13 @@ module WebDriver
expect(key_reporter.attribute('value')).to eq('Hello')
end

it 'should handle file uploads', except: {browser: %i[safari safari_preview]} do
it 'should handle file uploads' do
driver.navigate.to url_for('formPage.html')

element = driver.find_element(id: 'upload')
expect(element.attribute('value')).to be_empty

path = Tempfile.new('file-upload').path
path = WebDriver::Platform.windows_path(path) if WebDriver::Platform.windows?
path = WebDriver::Platform.windows? ? WebDriver::Platform.windows_path(__FILE__) : __FILE__

element.send_keys path

Expand Down

0 comments on commit a8fd30b

Please sign in to comment.