Closed Bug 1348282 Opened 7 years ago Closed 7 years ago

firefox 45.8.0 + selenium 3.3.1 : WebDriverException: Message: ReferenceError

Categories

(Remote Protocol :: Marionette, defect)

45 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1123506

People

(Reporter: virgile.dupuis, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20170302120751

Steps to reproduce:

Launch an automatic test width selenium : 

// index.html 
<!DOCTYPE html>
<html>
<head>
    <title>test</title>
    <script type="text/javascript">
        var roger = 10;
        function init() 
        {
           console.log("roger : "+roger);
        }
    </script>
</head>
<body onload="init()" bgcolor="silver">
    <div id="truc">toto</div> 
</body>
</html>


// test.py
from selenium import webdriver
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
from selenium.webdriver.support.ui import WebDriverWait
from selenium.w

ebdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException

import os
import subprocess
import time

driver = webdriver.Firefox()
driver.get("file:///path/to/index.html")
time.sleep(5)
print driver.execute_script("return roger;")

driver.close()

// commande
python test.py



Actual results:

Traceback (most recent call last):
File "test.py", line 22, in
print driver.execute_script("return roger;")
File "/netShare/home/buildsystem/Desktop/virgile/TEST/SELENIUM/selenium/webdriver/remote/webdriver.py", line 467, in execute_script
'args': converted_args})['value']
File "/netShare/home/buildsystem/Desktop/virgile/TEST/SELENIUM/selenium/webdriver/remote/webdriver.py", line 238, in execute
self.error_handler.check_response(response)
File "/netShare/home/buildsystem/Desktop/virgile/TEST/SELENIUM/selenium/webdriver/remote/errorhandler.py", line 193, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: ReferenceError: roger is not defined


Expected results:

10
Component: Untriaged → Marionette
Product: Firefox → Testing
The title of the bug and the browser version of bug report don't match. This issue did exist in 45 but has been fixed since. Please can you make sure that you are using the latest version of Firefox and let us know if the issue still exists.
Flags: needinfo?(virgile.dupuis)
Hi, 
here is the config to reproduce the bug : 
OS:
centos 6
Selenium Version:
3.3.1
Browser:
firefox
Browser Version:
45.8.0
Flags: needinfo?(virgile.dupuis)
This was fixed in Firefox 48.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.