From christopher.deven.atkinson at gmail.com Wed Jul 6 12:51:25 2011 From: christopher.deven.atkinson at gmail.com (Chris Atkinson) Date: Wed, 6 Jul 2011 12:51:25 -0400 Subject: [Celerity-users] Popup window does not close on JavaScript "self.close()" Message-ID: For the project I'm currently on we use watir to test the code in IE and watir-webdriver to test for firefox, we also use celerity to test on our SVN server. The popup window in question has an html button called "btnClose" that invokes JavaScript "self.close()" when we click it. Under watir and watir-webdriver the window closes, but in celerity it apparently does not. I've checked to make sure javascript is enabled. I can't see anything we could do differently except to use the "browser.close" method and that would defeat the purpose as the test is to make sure the button "btnClose" closes the popup window. Any ideas why this might be happening? From vamsisudhir at gmail.com Mon Jul 11 05:35:09 2011 From: vamsisudhir at gmail.com (vamsi sudhir) Date: Mon, 11 Jul 2011 15:05:09 +0530 Subject: [Celerity-users] Javascript execution hangs - Need help Message-ID: Hello, We are using Celerity (JRuby wrapper around Watir, using HtmlUnit as the underlying browser) to navigate thru the webpage, ( https://www.sos.ok.gov/corp/bulkorder/bulkDefault.aspx). We have encountered an issue with java script on this webpage. Javascript execution hangs when we try to access the URL https://www.sos.ok.gov/cart/contact.aspx?ReturnUrl=/corp/bulkorder/bulkEntry.aspxby clicking the "Place order" link on https://www.sos.ok.gov/corp/bulkorder/bulkDefault.aspx' Using java script debugger we found that JS hangs at this piece of code. *if (!ValidatedTextBoxOnKeyPress(event)) { event.cancelBubble = true; if (event.stopPropagation) event.stopPropagation(); return false; } * Also attached the entire java script file (okjs.zip) Javascript needs to be enabled to navigate through this website. So we can't disable javascript in this case. Also java script timeout doesnt seem to be working here. Is this a bug in htmlunit? Here is the code for your reference. *require 'rubygems' require 'celerity' proxyProtocol, proxyHost, proxyPort = ENV["http_proxy"].split(':') proxyHost = proxyHost.scan(%r"//(.*)")[0][0] browser = Celerity::Browser.new( { :browser => :firefox3, :proxy => proxyHost + ':' + proxyPort } ) browser.webclient.setJavaScriptEnabled(true) browser.css = false browser.secure_ssl = false ### HtmlUnit::Util::WebClientUtils.attachVisualDebugger(browser.webclient) browser.goto 'https://www.sos.ok.gov/corp/bulkorder/bulkDefault.aspx' ### This works alright. browser.wait puts "clicking Place Order" browser.button(:id,'ctl00_DefaultContent_buttonSubmit').click ### Here's where it hangs browser.wait puts browser.html * Thanks Vamsee. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: okjs.zip Type: application/zip Size: 4873 bytes Desc: not available URL: From suiyi_1118 at yahoo.com.cn Tue Jul 12 01:21:11 2011 From: suiyi_1118 at yahoo.com.cn (suiyi xue) Date: Tue, 12 Jul 2011 13:21:11 +0800 (CST) Subject: [Celerity-users] How to test autocomplete test fields with Cucumber + Celerity? Message-ID: <1310448071.26711.YahooMailRC@web15803.mail.cnb.yahoo.com> I have two statements in a scenario: When I fill word "software" in autocomplete text field for search Then this title "software engineering" is listed in autocomplete suggestion In my step definition, I have assign a value to the text field: text_field.value = the_search_word but it's not triggered the suggestion list. How do I make it work? -------------- next part -------------- An HTML attachment was scrubbed... URL: From chachi.richard at gmail.com Tue Jul 12 10:12:55 2011 From: chachi.richard at gmail.com (Charles Richard) Date: Tue, 12 Jul 2011 11:12:55 -0300 Subject: [Celerity-users] Celerity button value click Message-ID: Hi, I'm using Celerity with jRuby 1.6.2. I'm not sure what version Celerity itself is at but I only did the install recently so i believe it's at 0.8.9 . I'm trying to do a call such as: browser.button(:value,"Sign In").click But get a null pointer exception. I have another script that connects to a different url and makes the same type of call and this works. I saw a post with someone having the same type issue and there was a mention that the html source might be the issue and that a page validator could be run against it first to make sure. If so, how would i do this? If this is not the issue, is there a workaround? Cheers and thank you, Charles -------------- next part -------------- An HTML attachment was scrubbed... URL: From zeljko.filipin at wa-research.ch Tue Jul 12 10:29:02 2011 From: zeljko.filipin at wa-research.ch (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Tue, 12 Jul 2011 16:29:02 +0200 Subject: [Celerity-users] Celerity button value click In-Reply-To: References: Message-ID: On Tue, Jul 12, 2011 at 4:12 PM, Charles Richard wrote: > I saw a post with someone having the same type issue and there was a mention that the html source might be the issue and that a page validator could be run against it first to make sure. If so, how would i do this? Are you asking how to run HTML validator for a page? Just paste the url here: http://validator.w3.org/ ?eljko -- watir.com - community manager watir.com/book - author watirpodcast.com - host -------------- next part -------------- An HTML attachment was scrubbed... URL: From chachi.richard at gmail.com Tue Jul 12 10:39:55 2011 From: chachi.richard at gmail.com (Charles Richard) Date: Tue, 12 Jul 2011 11:39:55 -0300 Subject: [Celerity-users] Celerity button value click In-Reply-To: References: Message-ID: That was one question. Since I don't have direct control over the html source, i was also hoping there would be some kind of workaround that i could do to ignore any bad HTML syntax. I ran the validator and saw the following warnings: 1. [image: Warning] *Line 9, Column 1035*: The menu element is not supported by browsers yet. It would probably be better to wait for implementations. ?tlet-topper-toolbar_58" type="toolbar"*>*
*