Created
April 19, 2011 16:34
-
-
Save jarib/928722 to your computer and use it in GitHub Desktop.
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
| Apr 19, 2011 6:33:55 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify | |
| WARNING: Obsolete content type encountered: 'application/x-javascript'. | |
| Apr 19, 2011 6:33:56 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify | |
| WARNING: Obsolete content type encountered: 'application/x-javascript'. | |
| Apr 19, 2011 6:33:57 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error | |
| WARNING: CSS error: null [22:82] Error in expression. Invalid token "=". Was expecting one of: <S>, <COMMA>, "/", <PLUS>, "-", <HASH>, <STRING>, ")", <URI>, "inherit", <EMS>, <EXS>, <LENGTH_PX>, <LENGTH_CM>, <LENGTH_MM>, <LENGTH_IN>, <LENGTH_PT>, <LENGTH_PC>, <ANGLE_DEG>, <ANGLE_RAD>, <ANGLE_GRAD>, <TIME_MS>, <TIME_S>, <FREQ_HZ>, <FREQ_KHZ>, <DIMENSION>, <PERCENTAGE>, <NUMBER>, <FUNCTION>, <IDENT>. | |
| Apr 19, 2011 6:33:57 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error | |
| WARNING: CSS error: null [22:87] Error in style rule. Invalid token "opacity". Was expecting one of: "}", ";". | |
| Apr 19, 2011 6:33:57 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning | |
| WARNING: CSS warning: null [22:87] Ignoring the following declarations in this rule. | |
| Apr 19, 2011 6:33:57 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error | |
| WARNING: CSS error: null [116:72] Error in expression. Invalid token ".". Was expecting one of: <S>, <COMMA>, "/", <PLUS>, "-", <HASH>, <STRING>, ")", <URI>, "inherit", <EMS>, <EXS>, <LENGTH_PX>, <LENGTH_CM>, <LENGTH_MM>, <LENGTH_IN>, <LENGTH_PT>, <LENGTH_PC>, <ANGLE_DEG>, <ANGLE_RAD>, <ANGLE_GRAD>, <TIME_MS>, <TIME_S>, <FREQ_HZ>, <FREQ_KHZ>, <DIMENSION>, <PERCENTAGE>, <NUMBER>, <FUNCTION>, <IDENT>. | |
| Apr 19, 2011 6:33:57 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error | |
| WARNING: CSS error: null [124:48] Error in style rule. Invalid token "*". Was expecting one of: <S>, "}", ";", <IDENT>. | |
| Apr 19, 2011 6:33:57 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning | |
| WARNING: CSS warning: null [124:48] Ignoring the following declarations in this rule. | |
| Apr 19, 2011 6:33:57 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error | |
| WARNING: CSS error: null [131:98] Error in expression. Invalid token "=". Was expecting one of: <S>, <COMMA>, "/", <PLUS>, "-", <HASH>, <STRING>, ")", <URI>, "inherit", <EMS>, <EXS>, <LENGTH_PX>, <LENGTH_CM>, <LENGTH_MM>, <LENGTH_IN>, <LENGTH_PT>, <LENGTH_PC>, <ANGLE_DEG>, <ANGLE_RAD>, <ANGLE_GRAD>, <TIME_MS>, <TIME_S>, <FREQ_HZ>, <FREQ_KHZ>, <DIMENSION>, <PERCENTAGE>, <NUMBER>, <FUNCTION>, <IDENT>. | |
| Apr 19, 2011 6:33:57 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error | |
| WARNING: CSS error: null [132:74] Error in expression. Invalid token ".". Was expecting one of: <S>, <COMMA>, "/", <PLUS>, "-", <HASH>, <STRING>, ")", <URI>, "inherit", <EMS>, <EXS>, <LENGTH_PX>, <LENGTH_CM>, <LENGTH_MM>, <LENGTH_IN>, <LENGTH_PT>, <LENGTH_PC>, <ANGLE_DEG>, <ANGLE_RAD>, <ANGLE_GRAD>, <TIME_MS>, <TIME_S>, <FREQ_HZ>, <FREQ_KHZ>, <DIMENSION>, <PERCENTAGE>, <NUMBER>, <FUNCTION>, <IDENT>. | |
| Apr 19, 2011 6:33:57 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error | |
| WARNING: CSS error: null [133:71] Error in expression. Invalid token ".". Was expecting one of: <S>, <COMMA>, "/", <PLUS>, "-", <HASH>, <STRING>, ")", <URI>, "inherit", <EMS>, <EXS>, <LENGTH_PX>, <LENGTH_CM>, <LENGTH_MM>, <LENGTH_IN>, <LENGTH_PT>, <LENGTH_PC>, <ANGLE_DEG>, <ANGLE_RAD>, <ANGLE_GRAD>, <TIME_MS>, <TIME_S>, <FREQ_HZ>, <FREQ_KHZ>, <DIMENSION>, <PERCENTAGE>, <NUMBER>, <FUNCTION>, <IDENT>. | |
| Button Text: Login | |
| Apr 19, 2011 6:33:59 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify | |
| WARNING: Obsolete content type encountered: 'application/x-javascript'. | |
| Apr 19, 2011 6:33:59 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error | |
| WARNING: CSS error: null [65:16] Error in pseudo class or element. Invalid token ":". Was expecting one of: <FUNCTION>, <IDENT>. | |
| Apr 19, 2011 6:33:59 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning | |
| WARNING: CSS warning: null [65:16] Ignoring the whole rule. | |
| Apr 19, 2011 6:33:59 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error | |
| WARNING: CSS error: null [229:17] Error in pseudo class or element. Invalid token ":". Was expecting one of: <FUNCTION>, <IDENT>. | |
| Apr 19, 2011 6:33:59 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning | |
| WARNING: CSS warning: null [229:17] Ignoring the whole rule. | |
| Apr 19, 2011 6:33:59 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error | |
| WARNING: CSS error: null [258:21] Error in pseudo class or element. Invalid token ":". Was expecting one of: <FUNCTION>, <IDENT>. | |
| Apr 19, 2011 6:33:59 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning | |
| WARNING: CSS warning: null [258:21] Ignoring the whole rule. | |
| Apr 19, 2011 6:34:00 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify | |
| WARNING: Obsolete content type encountered: 'application/x-javascript'. | |
| Apr 19, 2011 6:34:00 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify | |
| WARNING: Obsolete content type encountered: 'application/x-javascript'. | |
| Apr 19, 2011 6:34:00 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify | |
| WARNING: Obsolete content type encountered: 'application/x-javascript'. | |
| *************************************************************** | |
| Browser 1 Text | |
| CelerityTestFoo | |
| CelerityTestFoo | |
| Login | |
| *************************************************************** | |
| *************************************************************** | |
| Browser 2 Text | |
| *************************************************************** |
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
| require 'celerity' | |
| path = File.expand_path "test.html" | |
| File.open(path, "w") { |file| file << DATA.read } | |
| browser = Celerity::Browser.new :javascript_exceptions => true, :log_level => :all, :resynchronize => true | |
| browser.goto("file://#{path}") | |
| puts("Button Text: " + browser.button(:id, "loginButton").text) | |
| browser2 = browser.button(:id, "loginButton").click_and_attach | |
| puts("***************************************************************") | |
| puts("Browser 1 Text") | |
| puts(browser.text) | |
| puts("***************************************************************") | |
| puts("***************************************************************") | |
| puts("Browser 2 Text") | |
| puts(browser2.text) | |
| puts("***************************************************************") | |
| __END__ | |
| <!DOCTYPE html> | |
| <html xmlns="http://www.w3.org/1999/xhtml" | |
| xmlns:fb="http://www.facebook.com/2008/fbml"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | |
| <title>CelerityTestFoo</title> | |
| </head> | |
| <body> | |
| <h1>CelerityTestFoo</h1> | |
| <div id="fb-root"></div> | |
| <script src="http://connect.facebook.net/en_US/all.js"></script> | |
| <script> | |
| FB.init({ | |
| appId : '219977654685618', | |
| status : true, // check login status | |
| cookie : false, // enable cookies to allow the server to access thesession | |
| xfbml : true // parse XFBML | |
| }); | |
| function loginToFacebook() | |
| { | |
| FB.login(handleLoginResponse,{perms:'publish_stream,manage_pages,offline_access'}); | |
| } | |
| function handleLoginResponse(response) | |
| { | |
| } | |
| </script> | |
| <script src="http://connect.facebook.net/en_US/all.js#appId=219977654685618&xfbml=1"></script> | |
| <button id="loginButton" onClick="loginToFacebook()">Login</button> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment