History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: SEL-558
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: David Burns
Votes: 1
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
Selenium

Can not call javascript functions from browserbot anymore

Created: 26/Jun/08 06:31 AM   Updated: 19/Nov/08 10:08 AM
Component/s: BrowserBot-IE
Affects Version/s: 1.0.1
Fix Version/s: 1.0

File Attachments: None
Image Attachments:

1. EMR500-0108.jpg
(133 kb)

2. selenium1b1.JPG
(111 kb)
Environment:
Win XP
Firefox
IDE


 Description  « Hide
In the latest version of Selenium 1b2 you can no longer call JavaScript APIs by calling this.browserbot.getCurrentWindow().javascriptfunctionOnThePage()

It was working in 1b1 and before. I have had a look through the commits logs and through the files and can't spot anything obvious with them.

This is a very important feature for me because it allows me to test rich text editors.



 All   Comments   Change History      Sort Order:
David Burns - 26/Jun/08 06:35 AM
This was working for the selenium tutorial on Javascript on http://www.theautomatedtester.co.uk/

Haw-Bin Chai - 26/Jun/08 03:12 PM
Does "selenium.browserbot.etc" work? Referencing "this" might be the issue.

David Burns - 27/Jun/08 01:32 AM
I tried that as well. I have also noticed that trying to get information from the dom by that route also isnt working.

For example if I want to know the method for this form and put

<tr>
<td>storeEval</td>
<td>selenium.browserbot.getCurrentWindow().document.jiraform.method</td>
<td>test</td>
</tr>
<tr>
<td>echo</td>
<td>${test}</td>
<td></td>
</tr>

as my test it echos "post" in 1b1 but if I try do that in 1b2 i get

[error] Threw an exception: selenium.browserbot.getCurrentWindow().document.jiraform is undefined
or
[error] Threw an exception: this.browserbot.getCurrentWindow().document.jiraform is undefined


David Burns - 04/Jul/08 01:27 AM
This was done using Selenium IDE 1b1

Haw-Bin Chai - 06/Jul/08 11:44 PM
Determined cause of issue, see http://clearspace.openqa.org/message/46135

Haw-Bin Chai - 19/Nov/08 10:08 AM
Should be fixed in r2255. I added a new getUserWindow() method to the browserbot, which should be used instead of getCurrentWindow() to retrieve the current window.