Hi: I'm writing tests for django with javascript and I was wondering if the Selenium webdriver can access a javascript global variable. mypage
has a script that has a global variable I'd like to access. Is it possible? Thanks!
from django.test import LiveServerTestCase
from selenium.webdriver.firefox.webdriver import WebDriver
class TestEditorSelenium(LiveServerTestCase):
def setUp(self):
self.driver = WebDriver()
def test_mytest(self):
self.driver.get('%s%s' % (self.live_server_url, '/mypage/'))
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…