[wtr-general] Re: adding utf-8 character to text fields
Thanks that worked great On Oct 2, 9:33 am, Željko Filipin wrote: > On Fri, Oct 2, 2009 at 3:09 PM, Loft_Tester wrote: > > adding > > myself as a contributer of documentation is not going well at all. > > Would one of you guys give me a quick tutorial. > > - log in to wiki > - go tohttp://wiki.openqa.org/display/WTR/Contributors > - click `Edit` (top lef) > - click `Wiki Markup` (left) - optional, I just do not like to work with > rich text > - find: > > "- [Karim Rayani|~karim.goa] > -- Updated [Watir Methods Supported by HTML Element]" > > - add under it (remove quotes): > > "- [Aaron Roy|~lofttester] > -- Created [Adding UTF-8 characters to text fields]" > > - click `Preview` - optional, just to make sure everything looks fine > - in `Comment` text box (bottom left) enter something like (remove quotes): > `added myself to documentation contributors` > - click `Save` (bottom right) > - click `(view > change<http://wiki.openqa.org/pages/diffpages.action?pageId=12517382&origina...> > )` - optional, just to take a quick look what is actually changed > > Please let me know if you need more help with the wiki. > > Željko --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: adding utf-8 character to text fields
I feel like I'm taking the short bus to wiki school. I believe I figured out how to add my example to the correct place but adding myself as a contributer of documentation is not going well at all. Would one of you guys give me a quick tutorial. That would be great thanks. On Oct 1, 10:42 am, Željko Filipin wrote: > On Thu, Oct 1, 2009 at 4:30 PM, Loft_Tester wrote: > > I do not see it appear in examples. > > Fixed. > > I have moved it from child of Examples page to child of Advanced Examples. > Examples page is autogenerated, and shows only childen of it's children. > Take a look at page source if you want to know more. > > http://wiki.openqa.org/display/WTR/Examples > > Thanks for the contribution. Please add yourself to documentation > contributors at: > > http://wiki.openqa.org/display/WTR/Contributors > > Željko --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: adding utf-8 character to text fields
This may cause issues for some of our test where we are using high ascii characters not encoded in UTF-8. All of our test are data driven through excel we may just have to change the values to be UTF-8 encoded. Is there any Idea when the next version of watir is due out On Oct 2, 8:07 am, Željko Filipin wrote: > On Thu, Oct 1, 2009 at 8:36 PM, Jari Bakken wrote: > > Actually, UTF-8 is the default in Watir > > Jari, > > can you please update the page? I am not sure what to do. > > Željko --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: adding utf-8 character to text fields
Ok, I tried to add this. Here is the link http://wiki.openqa.org/display/WTR/Adding+UTF-8+characters+to+text+fields. I do not see it appear in examples. not really sure what I may have done wrong. On Sep 30, 8:51 am, Loft_Tester wrote: > I'll give it a shot. Thanks There is a lot to know when working with > UTF-8. > > On Sep 30, 4:09 am, Željko Filipin > wrote: > > > > > Would you put this on our wiki? I guess the best place is in `Learning > > More`section. > > >http://wiki.openqa.org/display/WTR/Learning+More > > > There are a lot of people that have UTF-8 related problems. > > > Please let me know if you need help with wiki. > > > Željko > > --http://watirpodcast.com/ > > > On Tue, Sep 29, 2009 at 5:11 PM, Loft_Tester wrote: > > > I got this to work. Here is the code: > > > > require 'win32ole' > > > require 'watir' > > > > WIN32OLE.codepage = WIN32OLE::CP_UTF8 #UTF-8 > > > > ### > > > $Browser = nil > > > > ENV["watir_browser"]="ie" > > > > $Browser = Watir::Browser.new > > > $Browser.goto "www.google.com" > > > > $Browser.text_field(:name,'q').value = "考" > > > $Browser.text_field(:name,'q').value = "\xE8\x80\x83" > > > ### --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: adding utf-8 character to text fields
I'll give it a shot. Thanks There is a lot to know when working with UTF-8. On Sep 30, 4:09 am, Željko Filipin wrote: > Would you put this on our wiki? I guess the best place is in `Learning > More`section. > > http://wiki.openqa.org/display/WTR/Learning+More > > There are a lot of people that have UTF-8 related problems. > > Please let me know if you need help with wiki. > > Željko > --http://watirpodcast.com/ > > > > On Tue, Sep 29, 2009 at 5:11 PM, Loft_Tester wrote: > > I got this to work. Here is the code: > > > require 'win32ole' > > require 'watir' > > > WIN32OLE.codepage = WIN32OLE::CP_UTF8 #UTF-8 > > > ### > > $Browser = nil > > > ENV["watir_browser"]="ie" > > > $Browser = Watir::Browser.new > > $Browser.goto "www.google.com" > > > $Browser.text_field(:name,'q').value = "考" > > $Browser.text_field(:name,'q').value = "\xE8\x80\x83" > > ### --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: adding utf-8 character to text fields
Ok, I got this to work. Here is the code: require 'win32ole' require 'watir' WIN32OLE.codepage = WIN32OLE::CP_UTF8 #UTF-8 ### $Browser = nil ENV["watir_browser"]="ie" $Browser = Watir::Browser.new $Browser.goto "www.google.com" $Browser.text_field(:name,'q').value = "考" $Browser.text_field(:name,'q').value = "\xE8\x80\x83" ### On Sep 28, 4:11 pm, Loft_Tester wrote: > This link will give more information about the character including > "Scripting-language > string"http://www.isthisthingon.org/unicode/clipboard.php?add=25911 > > On Sep 28, 4:01 pm, Loft_Tester wrote: > > > > > I am trying to enter a japanese(UTF8) character into one of the fields > > on our web page and I keep having ç ¾ posted instead of 攷. I believe > > I have to let watir know that I am using UTF-8 but how. I had the > > same problem going to the google.com home page. I can copy and paste > > the character above and it works fine. Here is the code I have been > > working with. > > > --- > > --- > > > require 'watir' > > $KCODE='u' > > require 'win32ole' > > WIN32OLE.codepage = WIN32OLE::CP_ACP #UTF8 > > > ### > > $Browser = nil > > > ENV["watir_browser"]="ie" > > > $Browser = Watir::Browser.new > > $Browser.goto "www.google.com" > > $Browser.text_field(:name,'q').set("攷") > > > # > > > This should be simple enough to do but I am not sure how. Thanks for > > your help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: adding utf-8 character to text fields
This link will give more information about the character including "Scripting-language string" http://www.isthisthingon.org/unicode/clipboard.php?add=25911 On Sep 28, 4:01 pm, Loft_Tester wrote: > I am trying to enter a japanese(UTF8) character into one of the fields > on our web page and I keep having ç ¾ posted instead of 攷. I believe > I have to let watir know that I am using UTF-8 but how. I had the > same problem going to the google.com home page. I can copy and paste > the character above and it works fine. Here is the code I have been > working with. > > --- > --- > > require 'watir' > $KCODE='u' > require 'win32ole' > WIN32OLE.codepage = WIN32OLE::CP_ACP #UTF8 > > ### > $Browser = nil > > ENV["watir_browser"]="ie" > > $Browser = Watir::Browser.new > $Browser.goto "www.google.com" > $Browser.text_field(:name,'q').set("攷") > > # > > This should be simple enough to do but I am not sure how. Thanks for > your help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] adding utf-8 character to text fields
I am trying to enter a japanese(UTF8) character into one of the fields on our web page and I keep having ç ¾ posted instead of 攷. I believe I have to let watir know that I am using UTF-8 but how. I had the same problem going to the google.com home page. I can copy and paste the character above and it works fine. Here is the code I have been working with. -- require 'watir' $KCODE='u' require 'win32ole' WIN32OLE.codepage = WIN32OLE::CP_ACP #UTF8 ### $Browser = nil ENV["watir_browser"]="ie" $Browser = Watir::Browser.new $Browser.goto "www.google.com" $Browser.text_field(:name,'q').set("攷") # This should be simple enough to do but I am not sure how. Thanks for your help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Unable to find Items in Firefox
some of out id's have "." in them is this known to cause problems? On Aug 19, 3:36 pm, Loft_Tester wrote: > I appologize if the text wraps on your screan, It did not when the > entry was created > > On Aug 19, 2:56 pm, Loft_Tester wrote: > > > > > Recently, we updated our Web UI, and now watir is unable to find items > > in firefox. These items are also tested vs IE and those tests are > > working fine. I can not find a reason why these Items are failing. > > At first, I thought that it may be an issue with the "depth" of where > > the fields are in the HTML but that doesn't seem to be the issue. > > > In my test I am selecting an Item in the table, however the table > > "labelRow" is not able to be found. So I put a break point in my code > > before where the selection happens and do a "puts $Browser.table > > (:id,"labelRow").exists?" That returns false. I check firebug and it > > shows the table is there. I tried testin other Items on the page and > > things that were there were also returning a false positive (double > > and triple checked spelling). > > > Here is an example of what is returned from IE developer toolbar. The > > last Item is the table. I have placed 0's near items that returned > > true on "exists?" and an "x" that returned false. > > > > . > > . > > .. > > .. 0 > > .. 0 > > .. 0 > > .. x > > .. > id=extendedPrintViewContentForm> x > > .. > id=content_labelGridView.tile> x > > .. > accordian> > > .. > > .. > id=my_grid_Container> 0 > > .. > class=xhdr>x > > .. > class=objbox>x > > .. > =labelRow>x > > > The "."'s are to help with spacing, to show the structure of the > > html. So I wondered if the table was bing seen as a different name > > so I tried "puts $Browser.show_tables" and it returned "There are 0 > > tables" "0..-1". > > > I have not been able to find a pattern as to why watir can not find > > these items. Any sugestions would be greatly appreciated. If you > > need more information please let me know. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Unable to find Items in Firefox
Recently, we updated our Web UI, and now watir is unable to find items in firefox. These items are also tested vs IE and those tests are working fine. I can not find a reason why these Items are failing. At first, I thought that it may be an issue with the "depth" of where the fields are in the HTML but that doesn't seem to be the issue. In my test I am selecting an Item in the table, however the table "labelRow" is not able to be found. So I put a break point in my code before where the selection happens and do a "puts $Browser.table (:id,"labelRow").exists?" That returns false. I check firebug and it shows the table is there. I tried testin other Items on the page and things that were there were also returning a false positive (double and triple checked spelling). Here is an example of what is returned from IE developer toolbar. The last Item is the table. I have placed 0's near items that returned true on "exists?" and an "x" that returned false. . . .. .. 0 .. 0 .. 0 .. x .. x .. x .. .. .. 0 ..x ..x ..x The "."'s are to help with spacing, to show the structure of the html. So I wondered if the table was bing seen as a different name so I tried "puts $Browser.show_tables" and it returned "There are 0 tables" "0..-1". I have not been able to find a pattern as to why watir can not find these items. Any sugestions would be greatly appreciated. If you need more information please let me know. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Unable to find Items in Firefox
I appologize if the text wraps on your screan, It did not when the entry was created On Aug 19, 2:56 pm, Loft_Tester wrote: > Recently, we updated our Web UI, and now watir is unable to find items > in firefox. These items are also tested vs IE and those tests are > working fine. I can not find a reason why these Items are failing. > At first, I thought that it may be an issue with the "depth" of where > the fields are in the HTML but that doesn't seem to be the issue. > > In my test I am selecting an Item in the table, however the table > "labelRow" is not able to be found. So I put a break point in my code > before where the selection happens and do a "puts $Browser.table > (:id,"labelRow").exists?" That returns false. I check firebug and it > shows the table is there. I tried testin other Items on the page and > things that were there were also returning a false positive (double > and triple checked spelling). > > Here is an example of what is returned from IE developer toolbar. The > last Item is the table. I have placed 0's near items that returned > true on "exists?" and an "x" that returned false. > > . > . > .. > .. 0 > .. 0 > .. 0 > .. x > .. id=extendedPrintViewContentForm> x > .. id=content_labelGridView.tile> x > .. accordian> > .. > .. id=my_grid_Container> 0 > .. class=xhdr>x > .. class=objbox>x > .. =labelRow>x > > The "."'s are to help with spacing, to show the structure of the > html. So I wondered if the table was bing seen as a different name > so I tried "puts $Browser.show_tables" and it returned "There are 0 > tables" "0..-1". > > I have not been able to find a pattern as to why watir can not find > these items. Any sugestions would be greatly appreciated. If you > need more information please let me know. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Fire Watir and Safari Watir
tables are supported. we have many table tests On Aug 7, 8:35 am, Angrez Singh wrote: > I think FireWatir does support Table element. look at the unit tests for > more details. > > Thanks, > Angrez > > On Fri, Aug 7, 2009 at 4:24 PM, Pallavi Sharma wrote: > > > > > Hey Angrez, > > > I found out Fire Watir doesn't supports Table element yet? Is that so? > > > Is there a list of elements not supported, supported etc..?? > > > Can you please share... > > > On Thu, Aug 6, 2009 at 7:00 PM, Angrez Singh wrote: > > >> Not sure about SafariWatir but FireWatir is now a part of Watir > >> installation. Why not you try using it and let us know if you find any > >> difference between the two. > >> More information here: > >>http://wiki.openqa.org/display/WTR/FireWatir > > >> Thanks, > >> Angrez > > >> On Thu, Aug 6, 2009 at 6:16 PM, Pallavi Sharma > >> wrote: > > >>> Hi > > >>> Has anyone ever used "FireWatir" and "Safari Watir" here? > > >>> Does these two flavours of watir support all kinds of elements. Is there > >>> any method element supported list for them available like we have for > >>> watir. > > >>> Anyone here, please update.. > > >>> Thanks > > >>> Pallavi --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Firewatir and HighAscii
Thanks Felipe that is working so far. I am going to include my class so that it helps others require 'win32ole' require 'iconv' $KCODE='u' WIN32OLE.codepage = WIN32OLE::CP_ACP #UTF8 class International def initialize # get log handle (should already exist; create returns) @log = TestLog.create("c:/","does not exist") end def convert(from, to, input) Iconv.conv(from,to, input) end def convCP1252toUTF8(input) convert('CP1252', 'UTF-8', input) end def convCP1252toUTF8Array(input) output = [] input.each do |x| output.push(convCP1252toUTF8(x)) end return output end end If there are questions please ask On Jun 30, 2:55 pm, Felipe Knorr Kuhn wrote: > Hello, > > I am using the following, found somewhere on the net (or even this list :) > > $KCODE = "u" > WIN32OLE.codepage = WIN32OLE::CP_UTF8 > > require 'iconv' > > module FireWatir > class DD < NonControlElement > TAG='DD' > end > class DL < NonControlElement > TAG='DL' > end > class DT < NonControlElement > TAG='DT' > end > class STRONG < NonControlElement > TAG='STRONG' > end > class TextField > def doKeyPress( value ) > # do not ask me why > value = Iconv.conv('CP1252', 'UTF-8', value) > @o.value = value > fire_key_events > end > end > end > > See if that helps > > FK > > 2009/6/30 Loft_Tester > > > > > > > I saw a post asking for the same thing a year ago and it didn't get > > any responses so I would like to try asking again and maybe one of you > > out there could help. > > > I am trying to read internationalized data in a text field. > > Field contents = Paço > > firewatir returns = Paço > > > This all works fine in IE here's what I have tried from searching in > > this forum > > setting > > $KCODE='u' > > > I have also tried > > > require 'win32ole' > > WIN32OLE.codepage = WIN32OLE::CP_ACP #UTF8 > > > and have returned the same data > > to see that data in a field you can go to > > >http://www.google.com/search?rlz=1C1GGLS_enUS311US311&aq=f&sourceid=c...o<http://www.google.com/search?rlz=1C1GGLS_enUS311US311&aq=f&sourceid=c...> > > > thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Firewatir and HighAscii
I saw a post asking for the same thing a year ago and it didn't get any responses so I would like to try asking again and maybe one of you out there could help. I am trying to read internationalized data in a text field. Field contents = Paço firewatir returns = Paço This all works fine in IE here's what I have tried from searching in this forum setting $KCODE='u' I have also tried require 'win32ole' WIN32OLE.codepage = WIN32OLE::CP_ACP #UTF8 and have returned the same data to see that data in a field you can go to http://www.google.com/search?rlz=1C1GGLS_enUS311US311&aq=f&sourceid=chrome&ie=UTF-8&q=Paço thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Getting style information in FireFox
firewatir 1.6.2 and firefox 3 I really appreciate you help. BTW, I swiched ("left") to ("display") like you had and it returned "8". I'm not sure what that means I also tried values (from firebug) "offsetLeft"(dom) and "font-size" both returned syntax errors What are the options to pass and where can I get them? I had to modify the cmd to: cmd ="document.defaultView.getComputedStyle( #...@element_name} ,null) [ '#{css_rule}' ];\n" because element object did not exist as a variable to pass On Jun 12, 5:01 pm, Paul Rogers wrote: > the Syntax error probably means the js is wrong. I cant take a look now, but > I can take a look monday. This was an old version of firewatir, so some > thanks have probably changed. What version of firewatir/firefox is this? > > Paul > > > > On Fri, Jun 12, 2009 at 2:54 PM, Loft_Tester wrote: > > > Ok, Paul, let me see if I have this right because what I'm trying to > > do is not working. I need to add the style method you displayed above > > to the Element class in the MozillaBaseElement.rb file. then I call > > "puts $Browser.text_field(:id,/PART/).style("left")" and that should > > return the left of that text_field. > > This is not working for me at all. I get an error message of > > "SyntaxError: syntax error". I added the method right after the > > initialize method. I know you said that I may have to make > > modifications but i'm not even getting close right now > > > On Jun 9, 5:10 pm, Paul Rogers wrote: > > > this is what Ive used. Its hacked out of a bigger method, so may need > > some > > > work > > > > cmd ="document.defaultView.getComputedStyle( #{element_object} , null)[ > > > '#{css_rule}' ];\n" > > > jssh_socket.send( cmd , 0 ) > > > actual_val = read_socket() > > > return actual_val > > > > I guess some thing like > > > > class Element > > > def style( css_rule ) > > > > cmd ="document.defaultView.getComputedStyle( #{element_object} , > > > null)[ '#{css_rule}' ];\n" > > > jssh_socket.send( cmd , 0 ) > > > actual_val = read_socket() > > > return actual_val > > > > end > > > end > > > > is what youd use > > > and then > > > > puts button(:id, x).style('display') > > > > but, like I said, hacked from something else so may need some work > > > > Paul > > > > On Tue, Jun 9, 2009 at 2:52 PM, George wrote: > > > > > Hey Loft, > > > > > I tried to look into this a little more. Check this out: > > > > >http://code.google.com/p/firewatir/issues/detail?id=76#c0 > > > > > It looks like there is a known issue using 'style' in FF, although I'm > > > > not sure if/when it will be resolved. > > > > > HTH, > > > > > George > > > > > On Jun 9, 9:39 am, Loft_Tester wrote: > > > > > I was trying to ask the same question in a differant way. I figure > > > > > with all the people that are using watir that someone may have a way > > > > > to pull the style data from a field in firefox. Like some one has a > > > > > way to scrape all the data in a field and then all I have to do is > > > > > parse through it to get what I want. > > > > > > On Jun 8, 4:59 pm, Chuck van der Linden wrote: > > > > > > > You had just asked in the other thread if there were workarounds.. > > > > > > so why are you an hour later starting a new thread asking the very > > > > > > same thing? > > > > > > > On Jun 8, 11:55 am, Loft_Tester wrote: > > > > > > > > I have a question already posted about using "currentstyle" in > > > > Firefox > > > > > > > and the fact that it dosen't work correctly. Is there another > > way to > > > > > > > gather style attributes such as left,top, color and so on. If > > > > > > > possible, I would like to do this with out modifying the > > firewatir > > > > > > > files. if there is a solution that works in both IE and Firefox > > that > > > > > > > would be best. Thanks. > > > > > > > > ps for more information on what I'm trying to do please see my > > other > > > > > > > post athttp:// > > > > groups.google.com/group/watir-general/browse_thread/thread/a1a... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Getting style information in FireFox
Ok, Paul, let me see if I have this right because what I'm trying to do is not working. I need to add the style method you displayed above to the Element class in the MozillaBaseElement.rb file. then I call "puts $Browser.text_field(:id,/PART/).style("left")" and that should return the left of that text_field. This is not working for me at all. I get an error message of "SyntaxError: syntax error". I added the method right after the initialize method. I know you said that I may have to make modifications but i'm not even getting close right now On Jun 9, 5:10 pm, Paul Rogers wrote: > this is what Ive used. Its hacked out of a bigger method, so may need some > work > > cmd ="document.defaultView.getComputedStyle( #{element_object} , null)[ > '#{css_rule}' ];\n" > jssh_socket.send( cmd , 0 ) > actual_val = read_socket() > return actual_val > > I guess some thing like > > class Element > def style( css_rule ) > > cmd ="document.defaultView.getComputedStyle( #{element_object} , > null)[ '#{css_rule}' ];\n" > jssh_socket.send( cmd , 0 ) > actual_val = read_socket() > return actual_val > > end > end > > is what youd use > and then > > puts button(:id, x).style('display') > > but, like I said, hacked from something else so may need some work > > Paul > > > > On Tue, Jun 9, 2009 at 2:52 PM, George wrote: > > > Hey Loft, > > > I tried to look into this a little more. Check this out: > > >http://code.google.com/p/firewatir/issues/detail?id=76#c0 > > > It looks like there is a known issue using 'style' in FF, although I'm > > not sure if/when it will be resolved. > > > HTH, > > > George > > > On Jun 9, 9:39 am, Loft_Tester wrote: > > > I was trying to ask the same question in a differant way. I figure > > > with all the people that are using watir that someone may have a way > > > to pull the style data from a field in firefox. Like some one has a > > > way to scrape all the data in a field and then all I have to do is > > > parse through it to get what I want. > > > > On Jun 8, 4:59 pm, Chuck van der Linden wrote: > > > > > You had just asked in the other thread if there were workarounds.. > > > > so why are you an hour later starting a new thread asking the very > > > > same thing? > > > > > On Jun 8, 11:55 am, Loft_Tester wrote: > > > > > > I have a question already posted about using "currentstyle" in > > Firefox > > > > > and the fact that it dosen't work correctly. Is there another way to > > > > > gather style attributes such as left,top, color and so on. If > > > > > possible, I would like to do this with out modifying the firewatir > > > > > files. if there is a solution that works in both IE and Firefox that > > > > > would be best. Thanks. > > > > > > ps for more information on what I'm trying to do please see my other > > > > > post athttp:// > > groups.google.com/group/watir-general/browse_thread/thread/a1a... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Getting style information in FireFox
thanks guys I give this a shot On Jun 9, 5:10 pm, Paul Rogers wrote: > this is what Ive used. Its hacked out of a bigger method, so may need some > work > > cmd ="document.defaultView.getComputedStyle( #{element_object} , null)[ > '#{css_rule}' ];\n" > jssh_socket.send( cmd , 0 ) > actual_val = read_socket() > return actual_val > > I guess some thing like > > class Element > def style( css_rule ) > > cmd ="document.defaultView.getComputedStyle( #{element_object} , > null)[ '#{css_rule}' ];\n" > jssh_socket.send( cmd , 0 ) > actual_val = read_socket() > return actual_val > > end > end > > is what youd use > and then > > puts button(:id, x).style('display') > > but, like I said, hacked from something else so may need some work > > Paul > > > > On Tue, Jun 9, 2009 at 2:52 PM, George wrote: > > > Hey Loft, > > > I tried to look into this a little more. Check this out: > > >http://code.google.com/p/firewatir/issues/detail?id=76#c0 > > > It looks like there is a known issue using 'style' in FF, although I'm > > not sure if/when it will be resolved. > > > HTH, > > > George > > > On Jun 9, 9:39 am, Loft_Tester wrote: > > > I was trying to ask the same question in a differant way. I figure > > > with all the people that are using watir that someone may have a way > > > to pull the style data from a field in firefox. Like some one has a > > > way to scrape all the data in a field and then all I have to do is > > > parse through it to get what I want. > > > > On Jun 8, 4:59 pm, Chuck van der Linden wrote: > > > > > You had just asked in the other thread if there were workarounds.. > > > > so why are you an hour later starting a new thread asking the very > > > > same thing? > > > > > On Jun 8, 11:55 am, Loft_Tester wrote: > > > > > > I have a question already posted about using "currentstyle" in > > Firefox > > > > > and the fact that it dosen't work correctly. Is there another way to > > > > > gather style attributes such as left,top, color and so on. If > > > > > possible, I would like to do this with out modifying the firewatir > > > > > files. if there is a solution that works in both IE and Firefox that > > > > > would be best. Thanks. > > > > > > ps for more information on what I'm trying to do please see my other > > > > > post athttp:// > > groups.google.com/group/watir-general/browse_thread/thread/a1a... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Please help! Can no longer open a Firefox browser...
If I cant get my stuff working at least I can help other people. Hopefully the karma gods will shine down on me On Jun 8, 6:00 pm, George wrote: > Actually, switching to IE worked just fine for me (sorry, I should > have mentioned that earlier). Loft_Tester reminded me that I forgot > to include the JSSH extension as I was installing everything. It's > working just fine now...thanks for the help! > > -George > > On Jun 8, 2:25 pm, Chuck van der Linden wrote: > > > > > I would also make sure you have all the proper gem's installed and > > updated. This sounds similar to some other issues people have had > > with some win32 related stuff that Watir needs.. > > > If you search the group for "Win32" you'll find some threads related > > to that, might want to peruse them and try the fixes identified, maybe > > that one of them will solve your problem. > > > Also, if you switch the browser to IE, does it work? or do you get the > > same error? that might be telling as to if this is something specific > > to FF or not. > > > On Jun 8, 1:45 pm, Loft_Tester wrote: > > > > try the firewatir unit test to see if their stuff runs. Did you > > > install the jssh for your version of firefox? > > > > On Jun 8, 4:20 pm, George wrote: > > > > > Hello, > > > > > I had to get a new hard drive and reinstall Ruby and Watir. I'm > > > > pretty sure everything is set up...however, I'm getting a weird error > > > > when I attempt to open a Firefox browser. > > > > > The code: > > > > *** > > > > require 'watir' > > > > Watir::Browser.default = 'firefox' > > > > $browser = Watir::Browser.new > > > > *** > > > > > The error: > > > > *** > > > > C:/Ruby/lib/ruby/1.8/win32/registry.rb:528:in `open': The system > > > > cannot find the file specified. (Win32::Registry::Error) > > > > from C:/Ruby/lib/ruby/1.8/win32/registry.rb:608:in `open' > > > > from > > > > C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/ > > > > firefox.rb:141:in `initialize' > > > > from C:/Ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/ > > > > browser.rb:65:in `new' > > > > from C:/Ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/ > > > > browser.rb:65:in `new' > > > > from test2.rb:3 > > > > > Any help would be most appreciated, thanks!- Hide quoted text - > > > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Getting style information in FireFox
I was trying to ask the same question in a differant way. I figure with all the people that are using watir that someone may have a way to pull the style data from a field in firefox. Like some one has a way to scrape all the data in a field and then all I have to do is parse through it to get what I want. On Jun 8, 4:59 pm, Chuck van der Linden wrote: > You had just asked in the other thread if there were workarounds.. > so why are you an hour later starting a new thread asking the very > same thing? > > On Jun 8, 11:55 am, Loft_Tester wrote: > > > > > I have a question already posted about using "currentstyle" in Firefox > > and the fact that it dosen't work correctly. Is there another way to > > gather style attributes such as left,top, color and so on. If > > possible, I would like to do this with out modifying the firewatir > > files. if there is a solution that works in both IE and Firefox that > > would be best. Thanks. > > > ps for more information on what I'm trying to do please see my other > > post > > athttp://groups.google.com/group/watir-general/browse_thread/thread/a1a... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: currentstyle not working in firefox
I'm dropping this little chunk of code in there that tries to pull style attributes from fields. What I'm attaching you can copy right into an .rb file and run. You can also toggle from IE to Firefox. I'm not sure if this was the best page to test against but since I'm asking for lots of help here I figured I would make it as easy as possible for someone to see and try what I am up against. So if anyone has a few minutes to give it a shot that would be much appreciated. thanks every one for the help. require 'watir' @Browser = "IE" #...@browser = "FireFox" @Test_site = "http://www.google.com/advanced_search?hl=en"; Watir::Browser.default = @Browser.downcase Watir.options[:browser]= @Browser.downcase $Browser = Watir::Browser.new #try to launch the browser $Browser.goto @Test_site #Navigate to page $Browser.wait; #works in IE puts $Browser.text_field (:name,'as_q').document.currentstyle.fontFamily On Jun 9, 11:40 am, Chuck van der Linden wrote: > what I've noticed re .style is that for some things that are standard > (visibility for example) I can just do > > browser.element(how,what).style.visibility > > For some other things we've defined outselves (for example we use 'z- > index') we had to remove special characters (the dash) and do it in > all caps as if it were a constant > > browser.element(how,what).style.ZINDEX > > but then our primary supported browser is IE (kinda comes with it > having largest share (for a little while longer anyway) and company > being a MS gold level partern) and firefox is secondary. So I don't > do a lot of this sort of thing with FF.. > > On Jun 9, 8:32 am, Loft_Tester wrote: > > > > > Is there a differant method other than invoke for style that works? > > > On Jun 9, 11:25 am, Loft_Tester wrote: > > > > Ok, I tried to use style. > > > For IE this works. > > > puts $Browser.text_field(:id,/PART/).style.invoke('left') > > > > when I try it in firefox I get Exception: "undefined method `invoke' > > > for "[object CSSStyleDeclaration]":String" has Occurred > > > > I feel as though I'm close I'm just missing something simple. Am I > > > using style correctly for firefox > > > > On Jun 8, 5:02 pm, Chuck van der Linden wrote: > > > > > have you tried just using the .style method on the specific object? > > > > > On Jun 8, 11:00 am, Loft_Tester wrote: > > > > > > Is there another workaround for this? Thanks > > > > > > On Jun 8, 10:38 am, Loft_Tester wrote: > > > > > > > OK, I tried working on this for sometime but I haven't come up with > > > > > > anything that works. I think my problem is that I am not familiar > > > > > > with jssh command language and how it works. maybe if I get some > > > > > > help > > > > > > with one conversion I'll be able to do the rest on my own. > > > > > > > I have this field $Browser.text_field(:id,"part") > > > > > > > In the method I created it pretty much looks like this > > > > > > > fieldID = 'part' > > > > > > styleID = 'left' > > > > > > attribute = $Browser.text_field > > > > > > (:id,fieldID).document.currentstyle.send(styleID ) #(ruby's send > > > > > > works > > > > > > awsome for thie) > > > > > > > "attibute" is equal to lefts value > > > > > > > So what I need to to figure out how to input the field ID and > > > > > > property > > > > > > I'm looking for and have it return the correct value. Thanks again > > > > > > for all the help- Hide quoted text - > > > > > > - Show quoted text -- Hide quoted text - > > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: currentstyle not working in firefox
Is there a differant method other than invoke for style that works? On Jun 9, 11:25 am, Loft_Tester wrote: > Ok, I tried to use style. > For IE this works. > puts $Browser.text_field(:id,/PART/).style.invoke('left') > > when I try it in firefox I get Exception: "undefined method `invoke' > for "[object CSSStyleDeclaration]":String" has Occurred > > I feel as though I'm close I'm just missing something simple. Am I > using style correctly for firefox > > On Jun 8, 5:02 pm, Chuck van der Linden wrote: > > > > > have you tried just using the .style method on the specific object? > > > On Jun 8, 11:00 am, Loft_Tester wrote: > > > > Is there another workaround for this? Thanks > > > > On Jun 8, 10:38 am, Loft_Tester wrote: > > > > > OK, I tried working on this for sometime but I haven't come up with > > > > anything that works. I think my problem is that I am not familiar > > > > with jssh command language and how it works. maybe if I get some help > > > > with one conversion I'll be able to do the rest on my own. > > > > > I have this field $Browser.text_field(:id,"part") > > > > > In the method I created it pretty much looks like this > > > > > fieldID = 'part' > > > > styleID = 'left' > > > > attribute = $Browser.text_field > > > > (:id,fieldID).document.currentstyle.send(styleID ) #(ruby's send works > > > > awsome for thie) > > > > > "attibute" is equal to lefts value > > > > > So what I need to to figure out how to input the field ID and property > > > > I'm looking for and have it return the correct value. Thanks again > > > > for all the help- Hide quoted text - > > > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: currentstyle not working in firefox
Ok, I tried to use style. For IE this works. puts $Browser.text_field(:id,/PART/).style.invoke('left') when I try it in firefox I get Exception: "undefined method `invoke' for "[object CSSStyleDeclaration]":String" has Occurred I feel as though I'm close I'm just missing something simple. Am I using style correctly for firefox On Jun 8, 5:02 pm, Chuck van der Linden wrote: > have you tried just using the .style method on the specific object? > > On Jun 8, 11:00 am, Loft_Tester wrote: > > > > > Is there another workaround for this? Thanks > > > On Jun 8, 10:38 am, Loft_Tester wrote: > > > > OK, I tried working on this for sometime but I haven't come up with > > > anything that works. I think my problem is that I am not familiar > > > with jssh command language and how it works. maybe if I get some help > > > with one conversion I'll be able to do the rest on my own. > > > > I have this field $Browser.text_field(:id,"part") > > > > In the method I created it pretty much looks like this > > > > fieldID = 'part' > > > styleID = 'left' > > > attribute = $Browser.text_field > > > (:id,fieldID).document.currentstyle.send(styleID ) #(ruby's send works > > > awsome for thie) > > > > "attibute" is equal to lefts value > > > > So what I need to to figure out how to input the field ID and property > > > I'm looking for and have it return the correct value. Thanks again > > > for all the help- Hide quoted text - > > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Please help! Can no longer open a Firefox browser...
try the firewatir unit test to see if their stuff runs. Did you install the jssh for your version of firefox? On Jun 8, 4:20 pm, George wrote: > Hello, > > I had to get a new hard drive and reinstall Ruby and Watir. I'm > pretty sure everything is set up...however, I'm getting a weird error > when I attempt to open a Firefox browser. > > The code: > *** > require 'watir' > Watir::Browser.default = 'firefox' > $browser = Watir::Browser.new > *** > > The error: > *** > C:/Ruby/lib/ruby/1.8/win32/registry.rb:528:in `open': The system > cannot find the file specified. (Win32::Registry::Error) > from C:/Ruby/lib/ruby/1.8/win32/registry.rb:608:in `open' > from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/ > firefox.rb:141:in `initialize' > from C:/Ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/ > browser.rb:65:in `new' > from C:/Ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/ > browser.rb:65:in `new' > from test2.rb:3 > > Any help would be most appreciated, thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Getting style information in FireFox
I have a question already posted about using "currentstyle" in Firefox and the fact that it dosen't work correctly. Is there another way to gather style attributes such as left,top, color and so on. If possible, I would like to do this with out modifying the firewatir files. if there is a solution that works in both IE and Firefox that would be best. Thanks. ps for more information on what I'm trying to do please see my other post at http://groups.google.com/group/watir-general/browse_thread/thread/a1ab98da9f70cb52 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Using Excel Files?
Excel, for us is used to just supply data for the test. On Jun 8, 2:18 pm, Juston wrote: > That actually makes a lot of sense for storing data. I misunderstood > what I was reading, it sounded like people were driving their run-time > behavior out of excel. > > I guess on that note its pretty safe to assume most people kind of > "Hard-Code" their test procedure into the logic of the program and > then use excel files to just provide data? > > On Jun 8, 11:58 am, Loft_Tester wrote: > > > > > In our tests we just read data from these excel spreadsheets then we > > use that data to drive our testcases. There is file out there called > > xls.rb, that reads from an excel spreadsheet. we use this library to > > do all of our reading. > > > On Jun 8, 12:59 pm, Charley Baker wrote: > > > > If you're looking at an Excel driven framework, then I'd suggest taking a > > > look at Rasta:http://rubyforge.org/projects/rasta/ I've not used it, but > > > it's certainly best of class for working with Excel and Watir. > > > > Charley Baker > > > blog:http://blog.charleybaker.org/ > > > Lead Developer, Watir,http://wtr.rubyforge.org > > > QA Architect, Gap Inc Direct > > > > On Mon, Jun 8, 2009 at 10:29 AM, Juston wrote: > > > > > Hey, > > > > I'm a Java/C++ programmer and a Ruby noob and I'm getting ready > > > > to build a testing application that would use Watir to test a set of > > > > web applications. As there are about 6 applications with similar > > > > interfaces but different behavior I'd like to recycle as much code as > > > > possible. The system I have designed winds up reading from a file and > > > > creating a set of objects that represent use cases which, when > > > > executed, go through the motions of clicking, setting and so on. I've > > > > noticed there are a few posts here and there that discuss reading test > > > > instructions from excel and that caught my eye. The questions I have > > > > are what is in these excel files, is it some sort of domain language > > > > or it is code that is run at runtime? Is there a tutorial? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: currentstyle not working in firefox
Is there another workaround for this? Thanks On Jun 8, 10:38 am, Loft_Tester wrote: > OK, I tried working on this for sometime but I haven't come up with > anything that works. I think my problem is that I am not familiar > with jssh command language and how it works. maybe if I get some help > with one conversion I'll be able to do the rest on my own. > > I have this field $Browser.text_field(:id,"part") > > In the method I created it pretty much looks like this > > fieldID = 'part' > styleID = 'left' > attribute = $Browser.text_field > (:id,fieldID).document.currentstyle.send(styleID ) #(ruby's send works > awsome for thie) > > "attibute" is equal to lefts value > > So what I need to to figure out how to input the field ID and property > I'm looking for and have it return the correct value. Thanks again > for all the help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Using Excel Files?
In our tests we just read data from these excel spreadsheets then we use that data to drive our testcases. There is file out there called xls.rb, that reads from an excel spreadsheet. we use this library to do all of our reading. On Jun 8, 12:59 pm, Charley Baker wrote: > If you're looking at an Excel driven framework, then I'd suggest taking a > look at Rasta:http://rubyforge.org/projects/rasta/ I've not used it, but > it's certainly best of class for working with Excel and Watir. > > Charley Baker > blog:http://blog.charleybaker.org/ > Lead Developer, Watir,http://wtr.rubyforge.org > QA Architect, Gap Inc Direct > > > > On Mon, Jun 8, 2009 at 10:29 AM, Juston wrote: > > > Hey, > > I'm a Java/C++ programmer and a Ruby noob and I'm getting ready > > to build a testing application that would use Watir to test a set of > > web applications. As there are about 6 applications with similar > > interfaces but different behavior I'd like to recycle as much code as > > possible. The system I have designed winds up reading from a file and > > creating a set of objects that represent use cases which, when > > executed, go through the motions of clicking, setting and so on. I've > > noticed there are a few posts here and there that discuss reading test > > instructions from excel and that caught my eye. The questions I have > > are what is in these excel files, is it some sort of domain language > > or it is code that is run at runtime? Is there a tutorial? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Office 2007 - Excel
we have been running in compatibility mode on for office 2003 on our test machines that seems to working fine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: currentstyle not working in firefox
OK, I tried working on this for sometime but I haven't come up with anything that works. I think my problem is that I am not familiar with jssh command language and how it works. maybe if I get some help with one conversion I'll be able to do the rest on my own. I have this field $Browser.text_field(:id,"part") In the method I created it pretty much looks like this fieldID = 'part' styleID = 'left' attribute = $Browser.text_field (:id,fieldID).document.currentstyle.send(styleID ) #(ruby's send works awsome for thie) "attibute" is equal to lefts value So what I need to to figure out how to input the field ID and property I'm looking for and have it return the correct value. Thanks again for all the help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: currentstyle not working in firefox
I'll give it a shot thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: currentstyle not working in firefox
sorry I got a little click happy I think it's funny that "document" didn't return anything does anyone know away around this? is there another way to pull style information other than currentstyle? please help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] currentstyle not working in firefox
High all, for our testing of fields properties such as textfields we are using "currentstyle". For example, to find the left of the textfield id=part it would look like "puts $Browser.text_field (:id,"part").document.currentstyle.left". This works great in IE. When I try to run this in firefox my code throws this exception: "undefined method `currentstyle' for "":String" has Occurred" So I tried to Narrow down where the issue lives so I broke the Code Up like this test = $Browser.text_field(:id,"part").document puts test puts test.currentstyle.left output: => then the exception is thrown running the same code in IE: =># =>458px --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Getting each value in excel and converting it while doing it
If you can change the formating of the excel cells were that data is stored to "text" that would probably be the cheapest resolution for you. If you have to change the data once it is already loaded in to ruby there are many options open to you. I recommend changing the spreadsheet --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Unable to enter integer value in a text_field
I've ran into this in the past as well. The only way is to send it as a string --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] unit test load order
Hi All, In order to kick off a unit test from a another file we are requiring that file. To launch a whole suite of tests we require multiple files. It seems that the order that the test run are dependent on the class name. Is there any was to conrtol the order that the test are run with out changing the names of the classes. see example below. require "test1.rb" # class testset_1 require "test2.rb" # class testset_2 require "test3.rb" # class testset_3 require "test4.rb" # class testset_4 require "test5.rb" # class testset_5 require "test6.rb" # class testset_6 require "test7.rb" # class testset_7 require "test8.rb" # class testset_8 require "test9.rb" # class testset_9 require "test10.rb" # class testset_10 require "test11.rb" # class testset_11 require "test12.rb" # class testset_12 The order I require the files in is the order that I would like the test to run in. However, the order seems dependant on class names here is the order that my test run. require "test1.rb" # class testset_1 require "test10.rb" # class testset_10 require "test11.rb" # class testset_11 require "test12.rb" # class testset_12 require "test2.rb" # class testset_2 require "test3.rb" # class testset_3 require "test4.rb" # class testset_4 require "test5.rb" # class testset_5 require "test6.rb" # class testset_6 require "test7.rb" # class testset_7 require "test8.rb" # class testset_8 require "test9.rb" # class testset_9 Without changing the names of the classes or files is there a way to control the test start order --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---