<p dir="auto">Extracted from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3474165426" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/6424" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/6424/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/6424">#6424</a>.</p>
<p dir="auto">This is a workaround for Selenium/Webdriver throwing an error <code class="notranslate">You are trying to upload something that isn't a file</code>, despite not trying to upload anything.</p>
<p dir="auto">In some circumstances, Selenium interprets the value <code class="notranslate">test</code> in a form field as a placeholder for a fake file upload. No idea why. Hat tip to <a href="https://blog.konoson.com/webdrivererror-you-are-trying-to-upload-something-that-isnt-a-file" rel="nofollow">https://blog.konoson.com/webdrivererror-you-are-trying-to-upload-something-that-isnt-a-file</a> for the info.</p>
<p dir="auto">This was discovered when trying to run a remote Selenium instance (in a separate Docker container). So I guess that's one such circumstance where this can happen.</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/6431'>https://github.com/openstreetmap/openstreetmap-website/pull/6431</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/6431/commits/529cf3480a265633db404897631be98fff84885c" class="commit-link">529cf34</a> Selenium/WebDriver thinks that `test` signals a fake file upload</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6431/files">11 files</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6431/files#diff-58be79ee432aa1a1e12529b3141879d9c9503ac6e071c47e2d53462d339362b7">test/application_system_test_case.rb</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6431/files#diff-0ebf4c65ae927de1d02650f4caa7f2810e14eb64201b7570cb30939f0ee38719">test/controllers/sessions_controller_test.rb</a>
(12)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6431/files#diff-3cb894babbd387f02bde8eb4daf7ddb6f0a5207d0562af589dc59a5653092c04">test/factories/user.rb</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6431/files#diff-263ed824209c1bdac16306014aa0ce3a15f026e6095b1b16ecc673c59c9a9eb1">test/integration/login_test.rb</a>
(64)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6431/files#diff-be2380df62967bf0c5853f681509cf5cd907dd105dcf2635b7047d5eac33f69f">test/integration/oauth2_test.rb</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6431/files#diff-44c1b0450e75f9cda1de7660f4f38821d4f2fada93df9b1ddf0805fc8e8498eb">test/integration/page_locale_test.rb</a>
(4)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6431/files#diff-a1eb8d1c90c9c5b030a23251f16373194677dff9ba313f63dd850d586ea15c85">test/integration/user_blocks_test.rb</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6431/files#diff-17e29600ff1f9545e4460fbe6a061b81327a65d7390a631b98ae36c506c59679">test/integration/user_diaries_test.rb</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6431/files#diff-5282e62ded5f4eeb7cedcc9637a0877d488ea1559fce342df79cf2c60e7dbe57">test/integration/user_terms_seen_test.rb</a>
(4)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6431/files#diff-6ce22050f5e780d3715895a102269999b084f36b58629e519f09e0b1ce969966">test/system/user_login_test.rb</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6431/files#diff-ba37813ca277c227a74a372479b7b05b7f3ff085d890ab708f80d62573efdb7a">test/test_helper.rb</a>
(2)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/6431.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/6431.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/6431.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/6431.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/6431">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLON5BQL7UTXJOULUE33WKLC5AVCNFSM6AAAAACINTVCHCVHI2DSMVQWIX3LMV43ASLTON2WKOZTGQ4DQMJTGMYTGNA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLJR6HPVUYMVLU7ZDTL3WKLC5A5CNFSM6AAAAACINTVCHCWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHM72FQBY.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/6431</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/6431",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/6431",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>