Re: [wtr-general] Get the DOM
I think it could work, How can I get the .html with watir? El 29 de noviembre de 2011 16:53, Željko Filipin zeljko.fili...@wa-research.ch escribió: On Tuesday, November 29, 2011, carmen3lia eliaol...@gmail.com wrote: Is there a way to get the entire DOM from a web page?? Would browser.html do the job? Zeljko -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Attentamente: Carmen Elia!! -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Re: Get the DOM
I think my better option is compare the html for both pages, save the html in a file and compare each one. What is the easy way to compare files? El 29 de noviembre de 2011 17:08, Chuck van der Linden sqa...@gmail.comescribió: Another option might be to just use a ready-made tool for this (ask yourself, am I likely to be the only person who's ever needed to do this?) I'm not sure how good it is, but here's one with a 30 day free trial and it only costs about $30 (ask yourself how much of your time you'd need to save to make purchase a no-brainer presuming it does what you need it to) http://www.htmlmatch.com/ On Nov 29, 2:29 pm, carmen3lia eliaol...@gmail.com wrote: Is there a way to get the entire DOM from a web page?? I need to enter to a page X connected to a server y, and enter to the same page X connected to the server X and compare that is the same page but in differents servers, I thought in get the DOM and compare each one. Is there another way to do that? -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Attentamente: Carmen Elia!! -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Re: Get the DOM
Yes you are right the pages are in different env, assume that both use the same code, that I need to do is a smoke test, Are the both pages exactly the same? At the time that both are loaded, are they using the same code? El 29 de noviembre de 2011 17:39, bis bis...@gmail.com escribió: to me this sounds a bit confusing. so i have a few questions server 1 is in env A server 2 is in env B can i assume one is a test env and one is a prod so if i assume that then in production env there might be extra tags, analytics, image tagging for search features and stuff like that. so the html will not be the same if its not then let me assume they are both deployed from the same code base? if yes then why not just use whatever your repository is and do a diff between the pages? if these are both completely off. can i get some more details why compare just the html and not the functionality of the pages themselves? if its more of a visual test why not look at them both at the same time or take screen shots of them both and do pixel by pixel comparison of the images? On Tue, Nov 29, 2011 at 3:29 PM, Carmen eliaol...@gmail.com wrote: I think my better option is compare the html for both pages, save the html in a file and compare each one. What is the easy way to compare files? El 29 de noviembre de 2011 17:08, Chuck van der Linden sqa...@gmail.comescribió: Another option might be to just use a ready-made tool for this (ask yourself, am I likely to be the only person who's ever needed to do this?) I'm not sure how good it is, but here's one with a 30 day free trial and it only costs about $30 (ask yourself how much of your time you'd need to save to make purchase a no-brainer presuming it does what you need it to) http://www.htmlmatch.com/ On Nov 29, 2:29 pm, carmen3lia eliaol...@gmail.com wrote: Is there a way to get the entire DOM from a web page?? I need to enter to a page X connected to a server y, and enter to the same page X connected to the server X and compare that is the same page but in differents servers, I thought in get the DOM and compare each one. Is there another way to do that? -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.comhttp://groups.google.com/group/watir-generalwatir-general+unsubscr...@googlegroups.com -- Attentamente: Carmen Elia!! -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Attentamente: Carmen Elia!! -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Re: Get the DOM
That I really need is know if the sites have the same functionality, I need to check if after some changes in the env A still has the same function of the env B. If you have some examples, I really appreciated it I am really new in automated test. =S El 29 de noviembre de 2011 18:27, bis bis...@gmail.com escribió: do you really need to have the exact same html or the exact same functionality? using the same code does not mean the same as having the same html do the sites need to look exactly the same? you can visually do that in seconds do they need to fucntion the same? if yes thats easy watir up some examples of how it should function and let them rip against both envs this seems to me more like a testing practice thing than a watir code thing. On Tue, Nov 29, 2011 at 4:11 PM, Carmen eliaol...@gmail.com wrote: Yes you are right the pages are in different env, assume that both use the same code, that I need to do is a smoke test, Are the both pages exactly the same? At the time that both are loaded, are they using the same code? El 29 de noviembre de 2011 17:39, bis bis...@gmail.com escribió: to me this sounds a bit confusing. so i have a few questions server 1 is in env A server 2 is in env B can i assume one is a test env and one is a prod so if i assume that then in production env there might be extra tags, analytics, image tagging for search features and stuff like that. so the html will not be the same if its not then let me assume they are both deployed from the same code base? if yes then why not just use whatever your repository is and do a diff between the pages? if these are both completely off. can i get some more details why compare just the html and not the functionality of the pages themselves? if its more of a visual test why not look at them both at the same time or take screen shots of them both and do pixel by pixel comparison of the images? On Tue, Nov 29, 2011 at 3:29 PM, Carmen eliaol...@gmail.com wrote: I think my better option is compare the html for both pages, save the html in a file and compare each one. What is the easy way to compare files? El 29 de noviembre de 2011 17:08, Chuck van der Linden sqa...@gmail.com escribió: Another option might be to just use a ready-made tool for this (ask yourself, am I likely to be the only person who's ever needed to do this?) I'm not sure how good it is, but here's one with a 30 day free trial and it only costs about $30 (ask yourself how much of your time you'd need to save to make purchase a no-brainer presuming it does what you need it to) http://www.htmlmatch.com/ On Nov 29, 2:29 pm, carmen3lia eliaol...@gmail.com wrote: Is there a way to get the entire DOM from a web page?? I need to enter to a page X connected to a server y, and enter to the same page X connected to the server X and compare that is the same page but in differents servers, I thought in get the DOM and compare each one. Is there another way to do that? -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.comhttp://groups.google.com/group/watir-generalwatir-general+unsubscr...@googlegroups.com -- Attentamente: Carmen Elia!! -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Attentamente: Carmen Elia!! -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Attentamente: Carmen Elia!! -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Re: How I can do double click on a calendar?
Im using the xpath because I dont have the ID but i talked ´to my Manager who is also a dev and the said me that the event is contained in the following xpath html/body/div/div/div[2]/div[2]/div[2]/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[25]/table/tbody/tr/td[2] 2010/8/13 Charley Baker charley.ba...@gmail.com Good god, I don't know why you would use an xpath like that, if you even have to use xpath. There's a js event tied to something in there, hard to tell what it is and where the event is tied to. I'd talk to your devs, figure out where the event is occurring and fire it on that container or element. Charley Baker Lead Developer, Watir, http://watir.com On Fri, Aug 13, 2010 at 2:35 PM, Carmen eliaol...@gmail.com wrote: The problem is that the double click is not doing anything action, but if I send a single click, the click is sent. b.div(:xpath, /html/body/div/div/div[2]/div[2]/div[2]/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[27]/table/tbody/tr/td[2]).fire_event_no_wait(ondblclick) See the attachment with the code -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Attentamente: Carmen Elia!! -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Re: How I can do double click on a calendar?
There is a calendar with several rows, and you can do double click over the row like in the image attachment. 2010/8/13 Chuck van der Linden sqa...@gmail.com The problem is a) it makes for unreadable text code, there's no way to tell what cell it's clicking etc b) next month, will the xpath be the same? Are you folks using Coolite (EXTJS) tools? There's probably a better way to identify the place you are trying to doubleclick. possibly by the class of the row or div, and the text that's inside the cell. If you were doing this test manually, how would you know where to click? On Aug 13, 2:06 pm, Carmen eliaol...@gmail.com wrote: Im using the xpath because I dont have the ID but i talked ´to my Manager who is also a dev and the said me that the event is contained in the following xpath html/body/div/div/div[2]/div[2]/div[2]/div/div/div[2]/div/div[2]/div/div/di v[2]/div/div[25]/table/tbody/tr/td[2] 2010/8/13 Charley Baker charley.ba...@gmail.com Good god, I don't know why you would use an xpath like that, if you even have to use xpath. There's a js event tied to something in there, hard to tell what it is and where the event is tied to. I'd talk to your devs, figure out where the event is occurring and fire it on that container or element. Charley Baker Lead Developer, Watir,http://watir.com On Fri, Aug 13, 2010 at 2:35 PM, Carmen eliaol...@gmail.com wrote: The problem is that the double click is not doing anything action, but if I send a single click, the click is sent. b.div(:xpath, /html/body/div/div/div[2]/div[2]/div[2]/div/div/div[2]/div/div[2]/div/div/d iv[2]/div/div[27]/table/tbody/tr/td[2]).fire_event_no_wait(ondblclick) See the attachment with the code -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com watir-general%2bunsubscr...@goog legroups.com -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com watir-general%2bunsubscr...@goog legroups.com -- Attentamente: Carmen Elia!! -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Attentamente: Carmen Elia!! -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com attachment: calendar.JPG
Re: [wtr-general] Re: How I can do double click on a Cell
require 'rubygems' require 'watir' test_site = test_site ie = Watir::IE.new # print some comments puts Beginning of test: Login ComTogether. puts Step 1: go to the test site: + test_site ie.goto test_site puts Step 2: enter the 'Username' in the Username field. ie.text_field(:xpath, /html/body/div/table/tbody/tr/td/div/div/div/div/div[2]/div[2]/div[3]/input).set usert puts Step 3: enter the 'Password' in the Password field. ie.text_field(:xpath, /html/body/div/table/tbody/tr/td/div/div/div/div/div[2]/div[2]/div[5]/input).set pass. puts Step 4: click the 'Login' button. ie.button(:value, Login).click puts Expected Result: puts comTogether home page should be displayed puts Actual Result: if ie.text.include? Upcoming Events puts Test Passed. Found the test string: 'Upcoming Events'. Actual Results match Expected Results. else puts Test Failed! Could not find: 'Upcoming Events'. end puts End of test: Login ComTogether sleep 0.4 puts Beginning of test: Create Conference puts Step 1: Click on Calendar option #ie.button(:xpath,/html/body/div/div/div[2]/div[2]/div/div/table/tbody/tr/td/table/tbody/tr/td[3]/table/tbody/tr[2]/td[2]/em/button).click ie.div(:id,x-auto-51 ).click ie.cell(:xpath,/html/body/div/div/div[2]/div[2]/div[2]/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[17]/table/tbody/tr/td[2]).fire_event(ondblclick) This is the output ruby login.rb c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb:56:in `assert_exists': Unable to locate element, using :xpath, /html/body/div/div/div[2]/div[2]/div[2]/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[17]/table/tbody/tr/td[2] (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb:288:in `enabled?' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb:60:in `assert_enabled' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb:258:in `fire_event' from login.rb:35 Beginning of test: Login ComTogether. Step 1: go to the test site: https://comtogether.baktun.net/ Step 2: enter the 'Username' in the Username field. Step 3: enter the 'Password' in the Password field. Step 4: click the 'Login' button. Actual Result: Test Passed. Found the test string: 'Upcoming Events'. Actual Results match Expected Results. End of test: Login ComTogether Beginning of test: Create Conference Step 1: Click on Calendar option undefined method `toString' for nil:NilClass Exit code: 1 2010/7/28 Adam Reed reed.a...@gmail.com Can you provide the error message with line number and the rest of the script? The error does not appear to be generated by the code that you posted. Thanks On Jul 28, 2:52 pm, carmen3lia eliaol...@gmail.com wrote: I am not able to do double click on a Cell, this I have ie.cell(:xpath,/html/body/div/div/div[2]/div[2]/div[2]/div/div/ div[2]/div/div[2]/div/div/div[2]/div/div[17]/table/tbody/tr/ td[2]).fire_event(ondblclick) The following error is displayed undefined method `toString' for nil:NilClass -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Attentamente: Carmen Elia!! -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com