Selenium webdriver VirtualBox中的浏览器测试

Selenium webdriver VirtualBox中的浏览器测试,selenium-webdriver,django-testing,Selenium Webdriver,Django Testing,我已经在我的虚拟箱(独立开发服务器)中安装了openSuse服务器。在我的虚拟机中,我运行一个django项目。我编写了我的第一个测试用例,我想在其中使用selenium进行浏览器测试。有了当前的设置,可以在我的主机(使用Ubuntu 14.04的物理计算机)上打开浏览器并进行测试吗?例如,当我执行self.browser.get(“”)*时,它会在我的主机上打开浏览器吗 from django.test import TestCase from django.test import LiveS

我已经在我的虚拟箱(独立开发服务器)中安装了openSuse服务器。在我的虚拟机中,我运行一个django项目。我编写了我的第一个测试用例,我想在其中使用selenium进行浏览器测试。有了当前的设置,可以在我的主机(使用Ubuntu 14.04的物理计算机)上打开浏览器并进行测试吗?例如,当我执行self.browser.get(“”)*时,它会在我的主机上打开浏览器吗

from django.test import TestCase
from django.test import LiveServerTestCase
from selenium import webdriver

class AdminTest(LiveServerTestCase):

    def setUp(self):
        self.browser = webdriver.Firefox()
        self.browser.implicitly_wait(3)

    def tearDown(self):
        self.browser.quit()
        self.display.stop()

    def test_admin_page_is_working(self):
        # Gertrude opens her web browser, and goes to the admin page
        self.browser.get('http://myproject.com/admin/')

        # She sees the familiar 'Django administration' heading
        body = self.browser.find_element_by_tag_name('body')
        self.assertIn('Django administrationx', body.text)

        # TODO: use the admin site to create a Poll
        self.fail('finish this test')