
|
If you were logged in you would be able to see more operations.
|
|
|
Selenium
Created: 29/Sep/06 02:05 PM
Updated: 03/Mar/08 07:33 PM
|
|
| Component/s: |
None
|
| Affects Version/s: |
0.8.0
|
| Fix Version/s: |
1.0
|
|
|
Original Estimate:
|
Unknown
|
Remaining Estimate:
|
Unknown
|
Time Spent:
|
Unknown
|
|
Environment:
|
Any
|
|
|
Given a test like this:
...
<tr><td>open</td><td>/page1.html</td><td></td></tr>
<tr><td>storeLocation</td><td>loc</td><td></td></tr>
<tr><td>open</td><td>/page2.html</td><td></td></tr>
<tr><td>type</td><td>//input[@type="text"]</td><td>${loc}</td></tr>
...
The input field will be filled in with the URL of page2.html rather than page1 as expected. Here is a patch:
diff selenium-api.js.orig selenium-api.js
900c900
< return this.page().getCurrentWindow().location;
---
> return this.page().getCurrentWindow().location.href;
|
|
Description
|
Given a test like this:
...
<tr><td>open</td><td>/page1.html</td><td></td></tr>
<tr><td>storeLocation</td><td>loc</td><td></td></tr>
<tr><td>open</td><td>/page2.html</td><td></td></tr>
<tr><td>type</td><td>//input[@type="text"]</td><td>${loc}</td></tr>
...
The input field will be filled in with the URL of page2.html rather than page1 as expected. Here is a patch:
diff selenium-api.js.orig selenium-api.js
900c900
< return this.page().getCurrentWindow().location;
---
> return this.page().getCurrentWindow().location.href;
|
Show » |
|
For those waiting for this patch to be incorporated:
You can fix this in your user-extensions.js by overwriting the Selenium.prototype.getLocation
Selenium.prototype.getLocation = function() {
/** Gets the absolute URL of the current page.
*
* @return string the absolute URL of the current page
*/
return this.browserbot.getCurrentWindow().location.href;
};