List Info

Thread: Re: screen_capture filename




Re: screen_capture filename
user name
2007-04-11 14:07:49
This is probably some code that needs to be yanked out and put in contrib. I haven't used it and have yet to hear anyone else using it although I'm sure there are some. You might take a look at Aslak Hellesoy's screenshot library. http://blog.aslakhellesoy.com/2006/12/2/getting-screenshots-from-watir
which might make sense to include in Watir vs the screen_capture library since his implementation has unit tests. You can enter a ticket for that in Jira if you'd like. As far as the current function, taking a brief look at it, you've not included curly brackets for evaluation on the time.jpg variable, you might try the following:

screen_capture(" C:%5CInstantRails%5Crails_apps%5Cwatir_tests%5Cpublic%5Cimages%5C#time.jpg" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> C:\InstantRails\rails_apps\watir_tests\public\images\#{time.jpg}" , true, false)

 or this:

screen_capture(" C:%5CInstantRails%5Crails_apps%5Cwatir_tests%5Cpublic%5Cimages%5C#time.jpg" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> C:/InstantRails/rails_apps/watir_tests/public/images/#{time.jpg}" , true, false)

which should get converted into the same thing.


-Charley  


On 4/11/07, Matt Makins < matt.makinsstudylink.com">matt.makinsstudylink.com> wrote:

i am using the screen_capture function which i have working correctly.

 

How do i specify the path where i want to save the image file?

 

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; screen_capture(" C:%5CInstantRails%5Crails_apps%5Cwatir_tests%5Cpublic%5Cimages%5C#time.jpg" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> C:InstantRailsrails_appswatir_testspublicimages#time.jpg&quot; , true, false)

 

this doesn't work, anybody tried this??

 

Cheers,

Matt


_______________________________________________
Wtr-general mailing list
rubyforge.org">Wtr-generalrubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: screen_capture filename
country flaguser name
United Kingdom
2007-04-12 03:13:25

Hi Charley,

 

Thanks for that.

 

Regarding the omission of curly braces, I didn’;t think they were required when referencing a global or instance variable.

According to the ruby pickaxe book anyway ;)

 

Cheers,

Matt

 

From: wtr-general-bouncesrubyforge.org [mailto:wtr-general-bouncesrubyforge.org] On Behalf Of Charley Baker
Sent: 11 April 2007 20:08
To: wtr-generalrubyforge.org
Subject: Re: [Wtr-general] screen_capture filename

 

This is probably some code that needs to be yanked out and put in contrib. I haven't used it and have yet to hear anyone else using it although I'm sure there are some. You might take a look at Aslak Hellesoy's screenshot library. http://blog.aslakhellesoy.com/2006/12/2/getting-screenshots-from-watir
which might make sense to include in Watir vs the screen_capture library since his implementation has unit tests. You can enter a ticket for that in Jira if you'd like. As far as the current function, taking a brief look at it, you've not included curly brackets for evaluation on the time.jpg variable, you might try the following:

screen_capture("time.jpg" target="_blank"> C:\InstantRails\rails_apps\watir_tests\public\images\#{time.jpg}" , true, false)

 or this:

screen_capture("time.jpg" target="_blank"> C:/InstantRails/rails_apps/watir_tests/public/images/#{time.jpg}" , true, false)

which should get converted into the same thing.

 

-Charley  

 

On 4/11/07, Matt Makins <studylink.com">matt.makinsstudylink.com> wrote:

i am using the screen_capture function which i have working correctly.

 

How do i specify the path where i want to save the image file?

 

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; screen_capture(&quot;time.jpg" target="_blank"> C:InstantRailsrails_appswatir_testspublicimages#time.jpg&quot; , true, false)

 

this doesn't work, anybody tried this??

 

Cheers,

Matt


_______________________________________________
Wtr-general mailing list
Wtr-generalrubyforge.org">Wtr-generalrubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

 

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )