
| Key: |
SEL-243
|
| Type: |
Bug
|
| Status: |
Open
|
| Priority: |
Major
|
| Assignee: |
Unassigned
|
| Reporter: |
Dan Fabulich
|
| Votes: |
1
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
Selenium
Created: 24/May/06 01:49 PM
Updated: 20/Nov/06 11:54 AM
|
|
| Component/s: |
BrowserBot-Opera
|
| Affects Version/s: |
0.7.1
|
| Fix Version/s: |
None
|
|
|
Original Estimate:
|
Unknown
|
Remaining Estimate:
|
Unknown
|
Time Spent:
|
Unknown
|
|
File Attachments:
|
1.
index1837.html (52 kb)
|
|
|
Run TestCusorPosition test in Opera 8. It will fail.
Now try replacing the refreshAndWait call with unselectText (described below). Instead of correctly reporting that there is no cursor, it incorrectly reports that the cursor exists at its previous location, which is definitely incorrect.
No obvious way to fix this; just adding a warning in the docs.
|
|
Description
|
Run TestCusorPosition test in Opera 8. It will fail.
Now try replacing the refreshAndWait call with unselectText (described below). Instead of correctly reporting that there is no cursor, it incorrectly reports that the cursor exists at its previous location, which is definitely incorrect.
No obvious way to fix this; just adding a warning in the docs. |
Show » |
|
Selenium.prototype.doUnselectText = function() {
/**
* Unselects any text that the user has selected.
*/
var win = this.browserbot.getCurrentWindow();
var doc = this.page().currentDocument;
if (doc.selection && doc.selection.empty) {
doc.selection.empty();
doc.selection.clear();
return;
} else if (win.getSelection && win.getSelection().removeAllRanges) {
win.getSelection().removeAllRanges();
return;
}
else if (doc.getSelection && doc.getSelection().removeAllRanges) {
doc.getSelection().removeAllRanges();
return;
}
throw new Error("Couldn't unselect text on this browser!");
}
Note that to add this into selenium and add a test for it, we'd have to add a function that can select text, which will be tricky in Selenese, because you'll have to supply three arguments: locator, start, and end.