Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
SeleniumHQ
GitHub Repository: SeleniumHQ/Selenium
Path: blob/trunk/py/test/selenium/webdriver/ie/ie_launcher_tests.py
1865 views
1
# Licensed to the Software Freedom Conservancy (SFC) under one
2
# or more contributor license agreements. See the NOTICE file
3
# distributed with this work for additional information
4
# regarding copyright ownership. The SFC licenses this file
5
# to you under the Apache License, Version 2.0 (the
6
# "License"); you may not use this file except in compliance
7
# with the License. You may obtain a copy of the License at
8
#
9
# http://www.apache.org/licenses/LICENSE-2.0
10
#
11
# Unless required by applicable law or agreed to in writing,
12
# software distributed under the License is distributed on an
13
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
# KIND, either express or implied. See the License for the
15
# specific language governing permissions and limitations
16
# under the License.
17
18
from selenium.webdriver import Ie
19
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
20
from selenium.webdriver.ie.options import Options
21
22
23
def test_launch_and_close_browser():
24
driver = Ie()
25
driver.quit()
26
27
28
def test_we_can_launch_multiple_ie_instances():
29
driver1 = Ie()
30
driver2 = Ie()
31
driver3 = Ie()
32
driver1.quit()
33
driver2.quit()
34
driver3.quit()
35
36
37
def test_launch_ie_do_not_affect_default_capabilities():
38
expected = DesiredCapabilities.INTERNETEXPLORER.copy()
39
driver = Ie()
40
actual = DesiredCapabilities.INTERNETEXPLORER.copy()
41
driver.quit()
42
assert actual == expected
43
44
45
def test_launch_ie_with_options(pages):
46
opts = Options()
47
expected = "clicks.html"
48
opts.initial_browser_url = pages.url(expected)
49
driver = Ie(options=opts)
50
actual = driver.current_url
51
driver.quit()
52
assert expected in actual
53
54