From 5ce9b6167c32a6f0aa0d8a6e70e9c0b5256bc9f6 Mon Sep 17 00:00:00 2001 From: Hui Lan Date: Wed, 14 Jul 2021 17:50:38 +0800 Subject: [PATCH] test_*.py: use FIREFOX instead of CHROME --- app/test/test_add_word.py | 2 +- app/test/test_add_word_and_essay_does_not_change.py | 2 +- app/test/test_delete_word.py | 2 +- app/test/test_login.py | 2 +- app/test/test_login_security_fix.py | 2 +- app/test/test_next_essay.py | 2 +- app/test/test_page_position.py | 2 +- app/test/test_signup.py | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/test/test_add_word.py b/app/test/test_add_word.py index 05f7961..403e25a 100644 --- a/app/test/test_add_word.py +++ b/app/test/test_add_word.py @@ -7,7 +7,7 @@ from selenium.webdriver.common.desired_capabilities import DesiredCapabilities import random, time import string -driver = webdriver.Remote('http://localhost:4444/wd/hub', DesiredCapabilities.CHROME) +driver = webdriver.Remote('http://localhost:4444/wd/hub', DesiredCapabilities.FIREFOX) driver.implicitly_wait(10) HOME_PAGE = 'http://121.4.94.30:91/' diff --git a/app/test/test_add_word_and_essay_does_not_change.py b/app/test/test_add_word_and_essay_does_not_change.py index 61af4b8..2746657 100644 --- a/app/test/test_add_word_and_essay_does_not_change.py +++ b/app/test/test_add_word_and_essay_does_not_change.py @@ -7,7 +7,7 @@ from selenium.webdriver.common.desired_capabilities import DesiredCapabilities import random, time import string -driver = webdriver.Remote('http://localhost:4444/wd/hub', DesiredCapabilities.CHROME) +driver = webdriver.Remote('http://localhost:4444/wd/hub', DesiredCapabilities.FIREFOX) driver.implicitly_wait(10) HOME_PAGE = 'http://121.4.94.30:91/' diff --git a/app/test/test_delete_word.py b/app/test/test_delete_word.py index f42362e..9dcad81 100644 --- a/app/test/test_delete_word.py +++ b/app/test/test_delete_word.py @@ -10,7 +10,7 @@ import string # 调用本地chromedriver # driver = webdriver.Chrome(executable_path="D:\ChromeDriver\chromedriver.exe") # driver.get("http://127.0.0.1:5000/") -driver = webdriver.Remote('http://localhost:4444/wd/hub', DesiredCapabilities.CHROME) +driver = webdriver.Remote('http://localhost:4444/wd/hub', DesiredCapabilities.FIREFOX) driver.implicitly_wait(10) # driver.maximize_window() # HOME_PAGE = "http://127.0.0.1:5000/" diff --git a/app/test/test_login.py b/app/test/test_login.py index 2fc5d49..bb4df51 100644 --- a/app/test/test_login.py +++ b/app/test/test_login.py @@ -6,7 +6,7 @@ from selenium.webdriver.common.desired_capabilities import DesiredCapabilities import random, string -driver = webdriver.Remote('http://localhost:4444/wd/hub', DesiredCapabilities.CHROME) +driver = webdriver.Remote('http://localhost:4444/wd/hub', DesiredCapabilities.FIREFOX) driver.implicitly_wait(10) HOME_PAGE = 'http://121.4.94.30:91/' diff --git a/app/test/test_login_security_fix.py b/app/test/test_login_security_fix.py index b836b6b..461aaba 100644 --- a/app/test/test_login_security_fix.py +++ b/app/test/test_login_security_fix.py @@ -6,7 +6,7 @@ from selenium.webdriver.common.desired_capabilities import DesiredCapabilities import random, string -driver = webdriver.Remote('http://localhost:4444/wd/hub', DesiredCapabilities.CHROME) +driver = webdriver.Remote('http://localhost:4444/wd/hub', DesiredCapabilities.FIREFOX) driver.implicitly_wait(10) HOME_PAGE = 'http://121.4.94.30:91/' diff --git a/app/test/test_next_essay.py b/app/test/test_next_essay.py index bed6a92..9814e58 100644 --- a/app/test/test_next_essay.py +++ b/app/test/test_next_essay.py @@ -6,7 +6,7 @@ from selenium.webdriver.common.desired_capabilities import DesiredCapabilities import random, string, time -driver = webdriver.Remote('http://localhost:4444/wd/hub', DesiredCapabilities.CHROME) +driver = webdriver.Remote('http://localhost:4444/wd/hub', DesiredCapabilities.FIREFOX) driver.implicitly_wait(10) HOME_PAGE = 'http://121.4.94.30:91/' diff --git a/app/test/test_page_position.py b/app/test/test_page_position.py index 21a6722..4156d39 100644 --- a/app/test/test_page_position.py +++ b/app/test/test_page_position.py @@ -9,7 +9,7 @@ from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.common.desired_capabilities import DesiredCapabilities -driver = webdriver.Remote('http://localhost:4444/wd/hub', DesiredCapabilities.CHROME) +driver = webdriver.Remote('http://localhost:4444/wd/hub', DesiredCapabilities.FIREFOX) driver.implicitly_wait(10) HOME_PAGE = 'http://121.4.94.30:91/' diff --git a/app/test/test_signup.py b/app/test/test_signup.py index 596e53d..a2664c5 100644 --- a/app/test/test_signup.py +++ b/app/test/test_signup.py @@ -6,7 +6,7 @@ from selenium.webdriver.common.desired_capabilities import DesiredCapabilities import random, string -driver = webdriver.Remote('http://localhost:4444/wd/hub', DesiredCapabilities.CHROME) +driver = webdriver.Remote('http://localhost:4444/wd/hub', DesiredCapabilities.FIREFOX) driver.implicitly_wait(10) HOME_PAGE = 'http://121.4.94.30:91/'