Last active
February 1, 2017 10:27
-
-
Save hjwp/6fcfd14804bb17a0e8f80c59a954394a to your computer and use it in GitHub Desktop.
selenium geckodriver submit form back-n bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1485944341219 geckodriver INFO Listening on 127.0.0.1:41675 | |
1485944341325 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.t3ZWzjAMYYxm | |
1485944341326 geckodriver::marionette INFO Starting browser /usr/bin/firefox | |
1485944341329 geckodriver::marionette INFO Connecting to Marionette on localhost:37053 | |
1485944342011 Marionette INFO Listening on port 37053 | |
JavaScript error: chrome://marionette/content/listener.js, line 1028: NS_ERROR_UNKNOWN_PROTOCOL: | |
[Child 14847] ###!!! ABORT: Aborting on channel error.: file /build/firefox-K2Dm8Y/firefox-51.0.1+build2/ipc/glue/MessageChannel.cpp, line 2056 | |
[Child 14847] ###!!! ABORT: Aborting on channel error.: file /build/firefox-K2Dm8Y/firefox-51.0.1+build2/ipc/glue/MessageChannel.cpp, line 2056 | |
1485944344034 geckodriver INFO Listening on 127.0.0.1:34003 | |
1485944345118 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.O1yJi6VSZJ7i | |
1485944345118 geckodriver::marionette INFO Starting browser /usr/bin/firefox | |
1485944345121 geckodriver::marionette INFO Connecting to Marionette on localhost:35359 | |
1485944345801 Marionette INFO Listening on port 35359 | |
JavaScript error: chrome://marionette/content/listener.js, line 1028: NS_ERROR_UNKNOWN_PROTOCOL: | |
[Child 14952] ###!!! ABORT: Aborting on channel error.: file /build/firefox-K2Dm8Y/firefox-51.0.1+build2/ipc/glue/MessageChannel.cpp, line 2056 | |
[Child 14952] ###!!! ABORT: Aborting on channel error.: file /build/firefox-K2Dm8Y/firefox-51.0.1+build2/ipc/glue/MessageChannel.cpp, line 2056 | |
1485944441534 geckodriver INFO Listening on 127.0.0.1:39465 | |
1485944442636 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.OLu0HMF6oUWW | |
1485944442636 geckodriver::marionette INFO Starting browser /usr/bin/firefox | |
1485944442638 geckodriver::marionette INFO Connecting to Marionette on localhost:44541 | |
1485944443285 Marionette INFO Listening on port 44541 | |
JavaScript error: chrome://marionette/content/listener.js, line 1028: NS_ERROR_UNKNOWN_PROTOCOL: | |
[Child 15261] ###!!! ABORT: Aborting on channel error.: file /build/firefox-K2Dm8Y/firefox-51.0.1+build2/ipc/glue/MessageChannel.cpp, line 2056 | |
[Child 15261] ###!!! ABORT: Aborting on channel error.: file /build/firefox-K2Dm8Y/firefox-51.0.1+build2/ipc/glue/MessageChannel.cpp, line 2056 | |
1485944445289 geckodriver INFO Listening on 127.0.0.1:50079 | |
1485944446373 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.mLEi7VXnIhhz | |
1485944446373 geckodriver::marionette INFO Starting browser /usr/bin/firefox | |
1485944446376 geckodriver::marionette INFO Connecting to Marionette on localhost:33563 | |
1485944447056 Marionette INFO Listening on port 33563 | |
JavaScript error: chrome://marionette/content/listener.js, line 1028: NS_ERROR_UNKNOWN_PROTOCOL: | |
[Child 15368] ###!!! ABORT: Aborting on channel error.: file /build/firefox-K2Dm8Y/firefox-51.0.1+build2/ipc/glue/MessageChannel.cpp, line 2056 | |
[Child 15368] ###!!! ABORT: Aborting on channel error.: file /build/firefox-K2Dm8Y/firefox-51.0.1+build2/ipc/glue/MessageChannel.cpp, line 2056 | |
1485944466750 geckodriver INFO Listening on 127.0.0.1:37197 | |
1485944466860 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.7aGgnnz6Yaq5 | |
1485944466861 geckodriver::marionette INFO Starting browser /usr/bin/firefox | |
1485944466863 geckodriver::marionette INFO Connecting to Marionette on localhost:36557 | |
1485944467532 Marionette INFO Listening on port 36557 | |
[Child 15537] ###!!! ABORT: Aborting on channel error.: file /build/firefox-K2Dm8Y/firefox-51.0.1+build2/ipc/glue/MessageChannel.cpp, line 2056 | |
[Child 15537] ###!!! ABORT: Aborting on channel error.: file /build/firefox-K2Dm8Y/firefox-51.0.1+build2/ipc/glue/MessageChannel.cpp, line 2056 | |
1485944469551 geckodriver INFO Listening on 127.0.0.1:60095 | |
1485944470645 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.JGOWrqWRH2mo | |
1485944470646 geckodriver::marionette INFO Starting browser /usr/bin/firefox | |
1485944470653 geckodriver::marionette INFO Connecting to Marionette on localhost:39501 | |
1485944471322 Marionette INFO Listening on port 39501 | |
[Child 15648] ###!!! ABORT: Aborting on channel error.: file /build/firefox-K2Dm8Y/firefox-51.0.1+build2/ipc/glue/MessageChannel.cpp, line 2056 | |
[Child 15648] ###!!! ABORT: Aborting on channel error.: file /build/firefox-K2Dm8Y/firefox-51.0.1+build2/ipc/glue/MessageChannel.cpp, line 2056 | |
1485944488054 geckodriver INFO Listening on 127.0.0.1:48367 | |
1485944489146 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.0iyXoIDGh0G5 | |
1485944489147 geckodriver::marionette INFO Starting browser /usr/bin/firefox | |
1485944489149 geckodriver::marionette INFO Connecting to Marionette on localhost:39767 | |
1485944489813 Marionette INFO Listening on port 39767 | |
(firefox:15733): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed | |
(firefox:15733): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed | |
###!!! [Child][MessageChannel] Error: (msgtype=0x420003,name=PCompositable::Msg_Destroy) Channel error: cannot send/recv | |
###!!! [Child][MessageChannel] Error: (msgtype=0x1040003,name=PTexture::Msg_Destroy) Channel error: cannot send/recv | |
###!!! [Child][MessageChannel] Error: (msgtype=0x420003,name=PCompositable::Msg_Destroy) Channel error: cannot send/recv | |
[Child 15803] ###!!! ABORT: Aborting on channel error.: file /build/firefox-K2Dm8Y/firefox-51.0.1+build2/ipc/glue/MessageChannel.cpp, line 2056 | |
[Child 15803] ###!!! ABORT: Aborting on channel error.: file /build/firefox-K2Dm8Y/firefox-51.0.1+build2/ipc/glue/MessageChannel.cpp, line 2056 | |
1485944492107 geckodriver INFO Listening on 127.0.0.1:35597 | |
1485944493191 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.MsV1XsP20H2I | |
1485944493191 geckodriver::marionette INFO Starting browser /usr/bin/firefox | |
1485944493194 geckodriver::marionette INFO Connecting to Marionette on localhost:40449 | |
1485944493874 Marionette INFO Listening on port 40449 | |
(firefox:15852): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed | |
(firefox:15852): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed | |
[Child 15918] ###!!! ABORT: Aborting on channel error.: file /build/firefox-K2Dm8Y/firefox-51.0.1+build2/ipc/glue/MessageChannel.cpp, line 2056 | |
[Child 15918] ###!!! ABORT: Aborting on channel error.: file /build/firefox-K2Dm8Y/firefox-51.0.1+build2/ipc/glue/MessageChannel.cpp, line 2056 | |
1485944522040 geckodriver INFO Listening on 127.0.0.1:43779 | |
1485944523134 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.mW29hiGiIB7U | |
1485944523135 geckodriver::marionette INFO Starting browser /usr/bin/firefox | |
1485944523137 geckodriver::marionette INFO Connecting to Marionette on localhost:40661 | |
1485944523843 Marionette INFO Listening on port 40661 | |
(firefox:16000): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed | |
(firefox:16000): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed | |
[Child 16069] WARNING: pipe error (29): Connection reset by peer: file /build/firefox-K2Dm8Y/firefox-51.0.1+build2/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 323 | |
[Child 16069] WARNING: pipe error (3): Connection reset by peer: file /build/firefox-K2Dm8Y/firefox-51.0.1+build2/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 323 | |
###!!! [Child][MessageChannel] Error: (msgtype=0x1040003,name=PTexture::Msg_Destroy) Channel error: cannot send/recv | |
[Child 16069] ###!!! ABORT: Aborting on channel error.: file /build/firefox-K2Dm8Y/firefox-51.0.1+build2/ipc/glue/MessageChannel.cpp, line 2056 | |
[Child 16069] ###!!! ABORT: Aborting on channel error.: file /build/firefox-K2Dm8Y/firefox-51.0.1+build2/ipc/glue/MessageChannel.cpp, line 2056 | |
###!!! [Child][MessageChannel] Error: (msgtype=0x420003,name=PCompositable::Msg_Destroy) Channel error: cannot send/recv | |
###!!! [Child][MessageChannel] Error: (msgtype=0x420003,name=PCompositable::Msg_Destroy) Channel error: cannot send/recv | |
1485944526336 geckodriver INFO Listening on 127.0.0.1:55363 | |
1485944527420 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.YXEPkJoN3a53 | |
1485944527421 geckodriver::marionette INFO Starting browser /usr/bin/firefox | |
1485944527423 geckodriver::marionette INFO Connecting to Marionette on localhost:42695 | |
1485944528133 Marionette INFO Listening on port 42695 | |
(firefox:16113): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed | |
(firefox:16113): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed | |
[Child 16178] ###!!! ABORT: Aborting on channel error.: file /build/firefox-K2Dm8Y/firefox-51.0.1+build2/ipc/glue/MessageChannel.cpp, line 2056 | |
[Child 16178] ###!!! ABORT: Aborting on channel error.: file /build/firefox-K2Dm8Y/firefox-51.0.1+build2/ipc/glue/MessageChannel.cpp, line 2056 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<h1>Start page</h1> | |
<form method="GET" action="target.html"> | |
<input type="text" name="textinput" /> | |
</form> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium import webdriver | |
from selenium.common.exceptions import WebDriverException | |
from selenium.webdriver.common.keys import Keys | |
import time | |
import unittest | |
import subprocess | |
def wait_for(fn): | |
start_time = time.time() | |
while True: | |
try: | |
return fn() | |
except (AssertionError, WebDriverException) as e: | |
if time.time() - start_time > 5: | |
raise e | |
time.sleep(0.1) | |
class ReproTest(unittest.TestCase): | |
def setUp(self): | |
server = subprocess.Popen( | |
['python', '-m', 'http.server', '8000'], # assumes python 3 | |
) | |
self.addCleanup(server.kill) | |
self.browser = webdriver.Firefox() | |
self.addCleanup(self.browser.quit) | |
self.browser.get('http://localhost:8000') | |
def test_form_submit_with_Keys(self): | |
self.browser.find_element_by_name('textinput').send_keys('anything') | |
self.browser.find_element_by_name('textinput').send_keys(Keys.ENTER) | |
wait_for(lambda: self.assertIn( | |
'It worked!', | |
self.browser.find_element_by_tag_name('body').text | |
)) | |
def test_form_submit_with_back_n(self): | |
self.browser.find_element_by_name('textinput').send_keys('anything\n') | |
wait_for(lambda: self.assertIn( | |
'It worked!', | |
self.browser.find_element_by_tag_name('body').text | |
)) | |
unittest.main() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<h1>It worked!</h1> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment