Debugging something on Sahi, came across this interesting equality in javascript:
0 == "" is true!
So are:
1 == "1" etc.
An easy way to test these out (and any other single line javascript) is to type
javascript:0==""
on the browser url navigation bar.
Yes, it works on IE and firefox.
Tuesday, September 18, 2007
Sunday, June 24, 2007
Vote for Sahi on SourceForge Community Choice Awards 2007
If you like Sahi, nominate and vote for it in the SourceForge Community Choice Awards 2007.
Ask your friends, colleagues and other bloggers to express support too. Thanks :)
http://sourceforge.net/projects/sahi
Ask your friends, colleagues and other bloggers to express support too. Thanks :)
http://sourceforge.net/projects/sahi
Labels:
Sahi
Saturday, May 26, 2007
Trip to BR Hills
Rashmi and I had been to this place called BR Hills near Mysore. It was early April and it was supposed to be a good time for sighting animals. But we were disappointed to know that a forest fire had burnt very large tracts of the forest and since there was no vegetation for the deer and other grazers, they had all moved away.
But luck was on our side. On the second night, we saw a bear in the moonlight, quite close to our log hut. It was scratching the ground and lazily moving around, making a lot of rustling noises among the fallen dry leaves.
The next day evening, as we were coming back from the safari, we saw a couple of deer, right by our side, totally ignoring us, and staring at something right ahead of us. They called twice, the sharp and loud "cow", the alarm call of the spotted deer. And then, from the grasses to the left, something came out on the road. In a second it vanished around the bend in the road. In a frenzy of excitement we urged the driver to drive down. He had not seen the animal come onto the road, but started driving down slowly to the bend. But the animal was gone.
We looked around, excited, frustrated and expectant. Someone saw a movement on the raised bank on the right. There it was, a full grown leopard, moving stealthily towards cover. A few more moves and the vegetation consumed the cat.
The now very excited driver guessed it must come out again a bit further and he started moving. And then we spotted it again. A magnificent animal, sitting right there, a few feet away, at a height on the raised bank which let us look at it straight in the eyes. I clicked away shaking with excitement. The leopard was just beautiful. I had never seen one so close and for so long. It just sat and looked at us. And slowly moved back, while still sitting, so that it was covered by some undergrowth. This is exactly how a tiger had behaved a few months back in Bandipur. Slowly creep backwards in imperceptible movements but soon be hidden from view behind some neighbouring undergrowth.
And then the leopard started moving. It came down the embankment and walked across the road and then down the curvy road which bent in a U to be parallel with us again. And man, was it brilliant. The leopard moved effortlessly, purposefully, silently, stealthily and man, so beautifully. And it was in full view of us all the time!
15 minutes had gone by and it was still around! Perfect sighting!
And then we started moving towards it, as we had to return to camp, and by then the leopard decided to vanish. And vanish he did. We could not figure out where he went.
We were again rewarded th next day with a bear sighting while we trekked nearby! Quite an eventful and satisfying three days!
But luck was on our side. On the second night, we saw a bear in the moonlight, quite close to our log hut. It was scratching the ground and lazily moving around, making a lot of rustling noises among the fallen dry leaves.
The next day evening, as we were coming back from the safari, we saw a couple of deer, right by our side, totally ignoring us, and staring at something right ahead of us. They called twice, the sharp and loud "cow", the alarm call of the spotted deer. And then, from the grasses to the left, something came out on the road. In a second it vanished around the bend in the road. In a frenzy of excitement we urged the driver to drive down. He had not seen the animal come onto the road, but started driving down slowly to the bend. But the animal was gone.
We looked around, excited, frustrated and expectant. Someone saw a movement on the raised bank on the right. There it was, a full grown leopard, moving stealthily towards cover. A few more moves and the vegetation consumed the cat.

The now very excited driver guessed it must come out again a bit further and he started moving. And then we spotted it again. A magnificent animal, sitting right there, a few feet away, at a height on the raised bank which let us look at it straight in the eyes. I clicked away shaking with excitement. The leopard was just beautiful. I had never seen one so close and for so long. It just sat and looked at us. And slowly moved back, while still sitting, so that it was covered by some undergrowth. This is exactly how a tiger had behaved a few months back in Bandipur. Slowly creep backwards in imperceptible movements but soon be hidden from view behind some neighbouring undergrowth.

And then the leopard started moving. It came down the embankment and walked across the road and then down the curvy road which bent in a U to be parallel with us again. And man, was it brilliant. The leopard moved effortlessly, purposefully, silently, stealthily and man, so beautifully. And it was in full view of us all the time!
15 minutes had gone by and it was still around! Perfect sighting!
And then we started moving towards it, as we had to return to camp, and by then the leopard decided to vanish. And vanish he did. We could not figure out where he went.
We were again rewarded th next day with a bear sighting while we trekked nearby! Quite an eventful and satisfying three days!
Labels:
wildlife
Inter-linking of rivers in India is a bad idea
I think inter-linking of rivers in India is a bad idea.
Whenever any friend of mine sounds impressed with this grandiose idea, I have felt frustrated and disturbed. We tend to overlook smaller more effective solutions and go for more romantic and glamorous 'solutions'. So I had been hunting around to gather information on this and make a case of it to people who want to understand what the pros and cons of this effort are. Following are a few links which spell out the danger of going ahead with this plan which does not have enough scientific evidence or prior experience to back it.
The Interlinking of Indian Rivers
This link, by Shailendra Nath Ghosh, talks about what is wrong with the concept, and what questions need to be answered, to make a proper assessment of this project
More articles and opinions. Quite insightful.
Bangladesh's views on India's inter-linking of rivers (They too oppose this)
Narmada Bachao Aandolan's views in "Dams, Rivers and People": This talks about rehabilitation failures and need for local management and conservation than an imposed, top down solution. They may appear biased because of their image in the press but they are people who have seen and fought unselfishly for rehabilitation of displaced people.
"The proposal is even more dangerous as attempting to link up veins of different persons without trying to find out the blood groups of the individuals. He said consequences will be disastrous." from National Citizens’ Meeting in Delhi concludes: River Link Proposals ill conceived, not in national Interest
More:
ILR in Supreme Court
Bahuguna opposes interlinking of rivers
I have not included any links which talk about the environmental aspects of this inter-linking. While the impact will be enormously destructive, talking about it seems to turn off people because they cannot see how economic growth and environmental conservation can co-exist. (May these lesser mortals exit soon)
So next time you hear of the inter-linking of rivers , doubt it, question it and take the side of what then comes out as true and right.
Whenever any friend of mine sounds impressed with this grandiose idea, I have felt frustrated and disturbed. We tend to overlook smaller more effective solutions and go for more romantic and glamorous 'solutions'. So I had been hunting around to gather information on this and make a case of it to people who want to understand what the pros and cons of this effort are. Following are a few links which spell out the danger of going ahead with this plan which does not have enough scientific evidence or prior experience to back it.
The Interlinking of Indian Rivers
Some Questions on the Scientific, Economic and Environmental Dimensions of the Proposal
This link, by Shailendra Nath Ghosh, talks about what is wrong with the concept, and what questions need to be answered, to make a proper assessment of this project
More articles and opinions. Quite insightful.
Bangladesh's views on India's inter-linking of rivers (They too oppose this)
Narmada Bachao Aandolan's views in "Dams, Rivers and People": This talks about rehabilitation failures and need for local management and conservation than an imposed, top down solution. They may appear biased because of their image in the press but they are people who have seen and fought unselfishly for rehabilitation of displaced people.
"The proposal is even more dangerous as attempting to link up veins of different persons without trying to find out the blood groups of the individuals. He said consequences will be disastrous." from National Citizens’ Meeting in Delhi concludes: River Link Proposals ill conceived, not in national Interest
More:
ILR in Supreme Court
Bahuguna opposes interlinking of rivers
I have not included any links which talk about the environmental aspects of this inter-linking. While the impact will be enormously destructive, talking about it seems to turn off people because they cannot see how economic growth and environmental conservation can co-exist. (May these lesser mortals exit soon)
So next time you hear of the inter-linking of rivers , doubt it, question it and take the side of what then comes out as true and right.
Friday, February 02, 2007
Sahi Nightly Build 2006-02-02 released
Released another version of Sahi.
Added a few fixes to the release made 2 days back.
This is a fairly major release with the following changes:
* APIS added
_mockImage(pattern, clazz)
_assertContainsText(expected, el, msg)
_enableKeepAlive()
_disableKeepAlive()
_style(el, property)
_execute("commandline command");
* Feature additions
Test status on Controller
Launch test from command line
Add line numbers to script in logs
Back button support
Keep-alive support to tackle too many connections in TIME_WAIT issue
regular expression support in all APIs
Safari support
junit style logs added
jira issue tracking added
* Bugfixes
_condition when used with _include was stopping execution of script.
Of significance is the regular expression support in APIs.
So if you wanted to find a link which looks like "my_link_KJHSA" you could just do _link(/my_link_.*/).
Most APIs which took strings as parameters can now take regular expressions.
The communication between the browser and Sahi now uses Keep-Alive thus solving the major issue of too many connections in TIME_WAIT state.
Documentation is still being added for the new features on http://sahi.co.in
Added a few fixes to the release made 2 days back.
This is a fairly major release with the following changes:
* APIS added
_mockImage(pattern, clazz)
_assertContainsText(expected, el, msg)
_enableKeepAlive()
_disableKeepAlive()
_style(el, property)
_execute("commandline command");
* Feature additions
Test status on Controller
Launch test from command line
Add line numbers to script in logs
Back button support
Keep-alive support to tackle too many connections in TIME_WAIT issue
regular expression support in all APIs
Safari support
junit style logs added
jira issue tracking added
* Bugfixes
_condition when used with _include was stopping execution of script.
Of significance is the regular expression support in APIs.
So if you wanted to find a link which looks like "my_link_KJHSA" you could just do _link(/my_link_.*/).
Most APIs which took strings as parameters can now take regular expressions.
The communication between the browser and Sahi now uses Keep-Alive thus solving the major issue of too many connections in TIME_WAIT state.
Documentation is still being added for the new features on http://sahi.co.in
Labels:
Sahi
Sahi Nightly Build 2006-02-02 released
Released another version of Sahi.
Added a few fixes to the release made 2 days back.
This is a fairly major release with the following changes:
* APIS added
_mockImage(pattern, clazz)
_assertContainsText(expected, el, msg)
_enableKeepAlive()
_disableKeepAlive()
_style(el, property)
_execute("commandline command");
* Feature additions
Test status on Controller
Launch test from command line
Add line numbers to script in logs
Back button support
Keep-alive support to tackle too many connections in TIME_WAIT issue
regular expression support in all APIs
Safari support
junit style logs added
jira issue tracking added
* Bugfixes
_condition when used with _include was stopping execution of script.
Of significance is the regular expression support in APIs.
So if you wanted to find a link which looks like "my_link_KJHSA" you could just do _link(/my_link_.*/).
Most APIs which took strings as parameters can now take regular expressions.
The communication between the browser and Sahi now uses Keep-Alive thus solving the major issue of too many connections in TIME_WAIT state.
Documentation is still being added for the new features on http://sahi.co.in
Added a few fixes to the release made 2 days back.
This is a fairly major release with the following changes:
* APIS added
_mockImage(pattern, clazz)
_assertContainsText(expected, el, msg)
_enableKeepAlive()
_disableKeepAlive()
_style(el, property)
_execute("commandline command");
* Feature additions
Test status on Controller
Launch test from command line
Add line numbers to script in logs
Back button support
Keep-alive support to tackle too many connections in TIME_WAIT issue
regular expression support in all APIs
Safari support
junit style logs added
jira issue tracking added
* Bugfixes
_condition when used with _include was stopping execution of script.
Of significance is the regular expression support in APIs.
So if you wanted to find a link which looks like "my_link_KJHSA" you could just do _link(/my_link_.*/).
Most APIs which took strings as parameters can now take regular expressions.
The communication between the browser and Sahi now uses Keep-Alive thus solving the major issue of too many connections in TIME_WAIT state.
Documentation is still being added for the new features on http://sahi.co.in
Labels:
Sahi
Tuesday, December 12, 2006
Reward of Kabini
Call after alarm call signalled the presence of a tiger very close to us. Chitals stood alert with their tails up and ears perked up giving out the loud shrill call. A loud "Cow" - an abrupt shrill call very close to us. A flurry of running dots as the deer bolt. The lantana bushes still cover the tiger from us. We wait patiently and impatiently, wait intently, expectantly. A few minutes pass. A lull. Long laden lull. The deer grow silent. No more alarm calls. The tiger is gone. Not even a glimpse.
The aura of the tiger is no longer felt. Deer go back to their grazing, langurs back to their mischief.

We move on. Disappointed. The night is closing in. We exit the jungle right on time. Our guide Sivanand suggests we try our luck along the road. Our headlights on, we go at a slow pace. A small herd of wild gaur. Huge animals, very close to us. Unperturbed, happily grazing away. One crosses the road in front of us as we wait. Slow, deliberate, unconcerned by our presence. A few metres ahead, a big tusker. Elephants close to your vehicle are not very comforting. A lone male tusker doubly so. We watch, torchlight on the tusks. The elephant leaves us alone.
Alarm calls again. Chital very close. A predator nearby. Experience braces us for disappointment, but optimism still lurks. Sivanand points in the other direction from where we are looking. A smallish stocky animal. Comes out of the cover of the forest. Starts walking on the road. Slightly hurried. Aware of our presence. We move slowly towards it. Our headlights on, but slow enough not to frighten it away. Slow enough to frustrate us to know there is a leopard in front and we cannot see it clearly. Frustrating.
It was a good decision. The leopard moved off the road to the right. We moved in slowly. The pale yellow beam lights the animal's rump as it ambles slowly into the bushes. Then it stops and sits down. In the light of the torch. A female, not too big leopard. The eyes glint reddish in the light as she looks at us for a brief moment. Into the light, into our eyes. Lovely. Brief. She gets up and walks on, away into the bushes, into the darkness, and into the jungle. Back to her comfort zone. And we move on to ours.
The aura of the tiger is no longer felt. Deer go back to their grazing, langurs back to their mischief.

We move on. Disappointed. The night is closing in. We exit the jungle right on time. Our guide Sivanand suggests we try our luck along the road. Our headlights on, we go at a slow pace. A small herd of wild gaur. Huge animals, very close to us. Unperturbed, happily grazing away. One crosses the road in front of us as we wait. Slow, deliberate, unconcerned by our presence. A few metres ahead, a big tusker. Elephants close to your vehicle are not very comforting. A lone male tusker doubly so. We watch, torchlight on the tusks. The elephant leaves us alone.
Alarm calls again. Chital very close. A predator nearby. Experience braces us for disappointment, but optimism still lurks. Sivanand points in the other direction from where we are looking. A smallish stocky animal. Comes out of the cover of the forest. Starts walking on the road. Slightly hurried. Aware of our presence. We move slowly towards it. Our headlights on, but slow enough not to frighten it away. Slow enough to frustrate us to know there is a leopard in front and we cannot see it clearly. Frustrating.
It was a good decision. The leopard moved off the road to the right. We moved in slowly. The pale yellow beam lights the animal's rump as it ambles slowly into the bushes. Then it stops and sits down. In the light of the torch. A female, not too big leopard. The eyes glint reddish in the light as she looks at us for a brief moment. Into the light, into our eyes. Lovely. Brief. She gets up and walks on, away into the bushes, into the darkness, and into the jungle. Back to her comfort zone. And we move on to ours.
Labels:
wildlife
Saturday, December 02, 2006
Button tag problems and IE 6
Discovered that IE and Firefox handle the <button> tag differently.
If you have a tag like
When the form is submitted, the value of the parameter "b" is "abc" in firefox (the value attribute) while for IE, it is "Button Text" (the innerText)
Workaround?
We needed to submit a form using different buttons and each should send back its respective value.
We used
and on the server, accessed it by
params[hash(params["b"])]
where hash("Button Text 1") returns Hash_of_Button_Text_1
If you have a tag like
< button type="submit" name="b" value="abc">
Button Text< /button>
When the form is submitted, the value of the parameter "b" is "abc" in firefox (the value attribute) while for IE, it is "Button Text" (the innerText)
Workaround?
We needed to submit a form using different buttons and each should send back its respective value.
We used
< input type="submit" name="b" value="Button Text 1">
< input type="hidden" name="Hash_of_Button_Text_1"
value="value1">
< input type="submit" name="b" value="Button Text 2">
< input type="hidden" name="Hash_of_Button_Text_2"
value="value2">
and on the server, accessed it by
params[hash(params["b"])]
where hash("Button Text 1") returns Hash_of_Button_Text_1
Labels:
browsers
Monday, November 27, 2006
Ruby mocking - Using flexstub
Ruby proves to be as sweet as most people have claimed it to be.
Pick testing and and you hit flexmock and flexstub.
So how do you use them? Here goes:
You have
If you want to test method_1's conditonal logic, with method_2 and method_3 stubbed out, here is how you do it with flexstub:
So when would you use flexmock?
If you wish to mock all the methods being called on an object, you may use a flexmock.
A flexmock is an object which will just receive the methods you set expectations for, using should_receive.
If you wish to mock only one of the methods of an object but the other methods need to be invoked with the real functionality,
use flexstub to mock only that particular method.
As you see, method_1 is invoked properly, but method_2 and method_3 are stubbed out.
One remarkable thing about this is mocking out an object's new method.
Anywhere Customer.new is called inside any class during your test, it will return a mock_customer.
This is quite powerful, because we no longer need to use dependancy injection for just test purposes.
Pick testing and and you hit flexmock and flexstub.
So how do you use them? Here goes:
You have
class CA{
def method_1
do_some_processing
if condition method_2
else method_3
end
def method_2
do_some_slow_processing_worth_mocking_out
end
def method_3
do_some_more_slow_processing_worth_mocking_out
end
}
If you want to test method_1's conditonal logic, with method_2 and method_3 stubbed out, here is how you do it with flexstub:
require 'flexmock'
class MyTest< Test::Unit::TestCase
include FlexMock::TestCase
def test_method_1
ca = CA.new
# do something to make the condition be true
# stub some methods of the instance
stub = flexstub(ca)
stub.should_receive(:method_2).once
stub.should_receive(:method_3).never
ca.method_1
# Note: method_1 is invoked on ca.
# stub.method_1 will fail!
end
end
So when would you use flexmock?
If you wish to mock all the methods being called on an object, you may use a flexmock.
A flexmock is an object which will just receive the methods you set expectations for, using should_receive.
If you wish to mock only one of the methods of an object but the other methods need to be invoked with the real functionality,
use flexstub to mock only that particular method.
As you see, method_1 is invoked properly, but method_2 and method_3 are stubbed out.
One remarkable thing about this is mocking out an object's new method.
flexstub(Customer).should_receive(:new)
.and_return(mock_customer)
Anywhere Customer.new is called inside any class during your test, it will return a mock_customer.
This is quite powerful, because we no longer need to use dependancy injection for just test purposes.
Labels:
programming
So much for security!
If you are booking online on Spicejet, beware.
The lovely site which says verisign secured etc. actually sends all your credit card information as a query string!
So much for SSL!
I had written to them around 2 months back and it still remains the same!
The lovely site which says verisign secured etc. actually sends all your credit card information as a query string!
So much for SSL!
I had written to them around 2 months back and it still remains the same!
Labels:
browsers
Friday, October 20, 2006
Sahi - New Website
Sahi has a new look and location at http://sahi.co.in.
A new release (Nightly Build 2006-10-20) of Sahi is also available. Download from here
A new release (Nightly Build 2006-10-20) of Sahi is also available. Download from here
Labels:
Sahi
Monday, October 09, 2006
Bird Fight
Just posted an image of a fight between a brahminy kite and a purple swamphen.
The swamphen stamps and chases away the kite!
http://indianaturewatch.net/displayimage.php?id=4927
The swamphen stamps and chases away the kite!
http://indianaturewatch.net/displayimage.php?id=4927
Labels:
wildlife
Wednesday, October 04, 2006
Jamming thoughts
Travelling alone by car is a sin.
Why? It takes too much space on the roads.
The bigger the car the worse it is.
One car blocks roughly the space of four bikes.
So unless there are four people (at least) in a car, we are blocking resources which can be used more effectively.
Btw, bikes pollute more than new Euro IV cars (Source). So the problem is not straight forward.
There are a few things to consider:
What is the real problem? Road congestion or air pollution?
In Bangalore, it is road congestion. And it compounds air pollution. A car caught in congestion pollutes four times more than a running one (Source).
So if we have more free flowing traffic it is a big win. That means bikes are a decent option, and cars are not bad if fully utilized. Pooling in any form would help. Walking and cycling really are the best, but may not be feasible for everyone.
Pooling is kind of helpful in another way. One shares the stress of commuting and makes us human beings who snap less and who do not yell at the already poor pedestrian and the occasional cyclist.
Sad point is how the world sees it as a sign of success if you consume more resources and it may be perceived as below dignity for people to travel by cycle. Applause to those who have persevered cycling in Bangalore and because of their own profile are slowly making cycling be seen as cool and desirable.
Sad again that the right things have to be packaged as cool for most of us to accept it.
On a happier note, I hear less honking nowadays than I used to. People in Bangalore seem to be maturing to the traffic problem now. Cheers!
Why? It takes too much space on the roads.
The bigger the car the worse it is.
One car blocks roughly the space of four bikes.
So unless there are four people (at least) in a car, we are blocking resources which can be used more effectively.
Btw, bikes pollute more than new Euro IV cars (Source). So the problem is not straight forward.
There are a few things to consider:
What is the real problem? Road congestion or air pollution?
In Bangalore, it is road congestion. And it compounds air pollution. A car caught in congestion pollutes four times more than a running one (Source).
So if we have more free flowing traffic it is a big win. That means bikes are a decent option, and cars are not bad if fully utilized. Pooling in any form would help. Walking and cycling really are the best, but may not be feasible for everyone.
Pooling is kind of helpful in another way. One shares the stress of commuting and makes us human beings who snap less and who do not yell at the already poor pedestrian and the occasional cyclist.
Sad point is how the world sees it as a sign of success if you consume more resources and it may be perceived as below dignity for people to travel by cycle. Applause to those who have persevered cycling in Bangalore and because of their own profile are slowly making cycling be seen as cool and desirable.
Sad again that the right things have to be packaged as cool for most of us to accept it.
On a happier note, I hear less honking nowadays than I used to. People in Bangalore seem to be maturing to the traffic problem now. Cheers!
Wednesday, September 27, 2006
Treepie
Treepie.org is up again. So if you are a birder and are looking for a site to consolidate your bird lists, join it and manage your lists.
I am now linking birds with superb pictures posted by the growing community of excellent wildlife photographers in India Nature Watch and pictures from google image search.
I am now linking birds with superb pictures posted by the growing community of excellent wildlife photographers in India Nature Watch and pictures from google image search.
Labels:
wildlife
Monday, September 25, 2006
Turahalli
Chirdeep and I had gone owl hunting to this place called Turahalli. Do not know if we actually reached there but we did end up on a nice patch with lots of rocks around. No owls, but we managed to see rock agamas. Loads of them. Every rock was ruled by one.
Soon bored, bouldering entertained us briefly.
Then we came across a neat white cheeked barbet surprisingly sitting on an electric line absolutely unperturbed by our photographic intentions and let us come quite close to it.
Also managed a decent shot of a pied bushchat.


Soon bored, bouldering entertained us briefly.
Then we came across a neat white cheeked barbet surprisingly sitting on an electric line absolutely unperturbed by our photographic intentions and let us come quite close to it.
Also managed a decent shot of a pied bushchat.



Labels:
wildlife
Sunday, August 06, 2006
Birding in Bannerghatta
Chirdeep, Nikhil and I went birding on Saturday. Got a few pics.

Purple sunbird in non-breeding plumage

Plain flowerpecker

Purple sunbird in non-breeding plumage

Plain flowerpecker
Labels:
wildlife
Saturday, August 05, 2006
Blog for Sahi
Created a new blog for Sahi since there seem to be too many posts just on Sahi here.
That said,
Release 2006-08-06 with file upload facility has just come out
Toggling proxy on IE became easier with toggle_IE_proxy.exe and ProxyPal
And tons of thanks to Sriram Narayanan (Ram) for creating toggle_IE_proxy.exe
Seen few people who attack someone else's problem with such vigour and effect.
Taught me something...
That said,
Release 2006-08-06 with file upload facility has just come out
Toggling proxy on IE became easier with toggle_IE_proxy.exe and ProxyPal
And tons of thanks to Sriram Narayanan (Ram) for creating toggle_IE_proxy.exe
Seen few people who attack someone else's problem with such vigour and effect.
Taught me something...
Labels:
Sahi
Sunday, July 30, 2006
Automated file uploads, anyone?
Inspite of browsers playing spoil sport,
Sahi now handles file uploads too!
The strategy was to intercept the request in the proxy, read the file off the file system and insert it into the multipart request.
A workaround yes, but it at least works around!
Good thing is, it even records and plays back the file upload.
Code?
_setFile(_file("id"), "C:\\abc\\efg.jpg");
The file has to be present on that path on the machine running the proxy.
Coming up in the next build ...
Sahi now handles file uploads too!
The strategy was to intercept the request in the proxy, read the file off the file system and insert it into the multipart request.
A workaround yes, but it at least works around!
Good thing is, it even records and plays back the file upload.
Code?
_setFile(_file("id"), "C:\\abc\\efg.jpg");
The file has to be present on that path on the machine running the proxy.
Coming up in the next build ...
Labels:
Sahi
Saturday, July 29, 2006
Subscribe to:
Posts (Atom)