Skip to content

Instantly share code, notes, and snippets.

@mikitebeka
Created March 1, 2010 19:24
Show Gist options
  • Select an option

  • Save mikitebeka/318707 to your computer and use it in GitHub Desktop.

Select an option

Save mikitebeka/318707 to your computer and use it in GitHub Desktop.
>>> sel.get_text("css=.spec.failed")
u"should show more bet activities when click on the more button for pagination: https://saucelabs.com/jobs/f00def4823cd53312bc71f9d11eba0ac execution expired\n /mnt/buildslave-work/trunk-ie6/build/frontend/vendor/gems/selenium-client-1.2.16/lib/selenium/client/protocol.rb:19:in `string_command'\n/mnt/buildslave-work/trunk-ie6/build/frontend/vendor/gems/selenium-client-1.2.16/lib/selenium/client/protocol.rb:56:in `boolean_command'\n/mnt/buildslave-work/trunk-ie6/build/frontend/vendor/gems/selenium-client-1.2.16/lib/selenium/client/generated_driver.rb:1088:in `is_element_present'\n/mnt/buildslave-work/trunk-ie6/build/frontend/spec/spec_lib/selenium/page.rb:260:in `assert_no_server_errors'\n/mnt/buildslave-work/trunk-ie6/build/frontend/spec/spec_lib/selenium/page.rb:248:in `assert_no_errors'\n/mnt/buildslave-work/trunk-ie6/build/frontend/spec/spec_lib/selenium/page.rb:183:in `wait_for_load'\n/mnt/buildslave-work/trunk-ie6/build/frontend/spec/spec_lib/selenium/page.rb:233:in `click_and_wait'\n/mnt/buildslave-work/trunk-ie6/build/frontend/spec/spec_lib/selenium/lightboxes/login_lightbox.rb:24:in `submit'\n/mnt/buildslave-work/trunk-ie6/build/frontend/spec/spec_lib/selenium/lightboxes/login_lightbox.rb:7:in `login_as'\n/mnt/buildslave-work/trunk-ie6/build/frontend/spec/spec_lib/selenium/page.rb:19:in `login_as'\n./spec/views/activities_ui_spec.rb:141\n 17\n18 def string_command(verb, args=[])\n19 remote_control_command(verb, args)\n20 end"
>>> sel.get_text("css=.spec.failed:nth-of-type(1)")
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (216, 0))
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (1186, 0))
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
/home/miki/work/sandbox/miki/betable/<ipython console> in <module>()
/home/miki/work/env/lib/python2.6/site-packages/selenium-1.0.1-py2.6.egg/selenium.pyc in get_text(self, locator)
1187 'locator' is an element locator
1188 """
-> 1189 return self.get_string("getText", [locator,])
1190
1191
/home/miki/work/env/lib/python2.6/site-packages/selenium-1.0.1-py2.6.egg/selenium.pyc in get_string(self, verb, args)
217
218 def get_string(self, verb, args):
--> 219 result = self.do_command(verb, args)
220 return result[3:]
221
/home/miki/work/env/lib/python2.6/site-packages/selenium-1.0.1-py2.6.egg/selenium.pyc in do_command(self, verb, args)
213 #print "Selenium Result: " + repr(data) + "\n\n"
214 if (not data.startswith('OK')):
--> 215 raise Exception, data
216 return data
217
Exception: ERROR: Element css=.spec.failed:nth-of-type(1) not found
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment