Support Requests item #2578, was opened at 2005-10-05 13:14
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=488&aid=2578&group_id=104
Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: Accessing files using the URL instead of path.
Initial Comment:
For some reason I can't "see" a file using the URL. In the script below, I use
File.exist? to check the file exists. The first part of the example works, the
Path part. The second part, the URL part, fails... Is there some other method
for finding files in the file system using the URL?
My purpose for this is to muck with config settings in my watir scripts, in
order to manipulate my web app for testing. The actual file path for the
config files will vary depending on the location from which the scripts are
run. But the URL path is always constant. If I could access files using
//localhost/myApp/config/config.xml, I would be in business.
Thanks!
Dustin-
# includes
require 'watir'
require 'test/unit'
require 'test/unit/assertions'
include Watir
class FindFiles < Test::Unit::TestCase
def test_findFilesByURL
# Get file using system path
gotFileByPath =
File.exist?("C:\dev\mta\source\Test\UI\Config\ISSA\InSessionSystemAlert.xml")
assert(gotFileByPath, "Didn't find file by path")
# Get file using URL
gotFileByUrl =
File.exist?("http://localhost/Corillian.MTA.Test.UI/config/insessionsystemalert.xml")
assert(gotFileByUrl,"Didn't find file by url")
end
end
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=488&aid=2578&group_id=104
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general