-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'fix-selenium' of github.com:Shadow243/cypht into fix-se…
…lenium
- Loading branch information
Showing
15 changed files
with
143 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,16 @@ | |
chrome_options.add_argument('--headless') | ||
chrome_options.add_argument('--disable-gpu') | ||
chrome_options.BinaryLocation = "/usr/bin/google-chrome" | ||
chrome_options.add_argument("--window-size=2200,2800") | ||
chrome_options.add_argument("--window-size=3200,3800") | ||
|
||
chrome_options.headless = False | ||
chrome_options.add_argument("start-maximized") | ||
# options.add_experimental_option("detach", True) | ||
chrome_options.add_argument("--no-sandbox") | ||
chrome_options.add_experimental_option("excludeSwitches", ["enable-automation"]) | ||
chrome_options.add_experimental_option('excludeSwitches', ['enable-logging']) | ||
chrome_options.add_experimental_option('useAutomationExtension', False) | ||
chrome_options.add_argument('--disable-blink-features=AutomationControlled') | ||
|
||
RECIP='[email protected]' | ||
IMAP_ID='0' | ||
|
@@ -23,3 +32,4 @@ def get_driver(cap): | |
|
||
def success(driver): | ||
pass | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,7 +161,7 @@ def profiles(self): | |
'save', | ||
'profiles', | ||
'servers_page', | ||
'site', | ||
# 'site', | ||
'password', | ||
'logout', | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
from base import WebTest, USER, PASS | ||
from selenium.webdriver.common.by import By | ||
from runner import test_runner | ||
from settings import SettingsHelpers | ||
|
||
class ProfileTest(WebTest): | ||
class ProfileTest(SettingsHelpers): | ||
|
||
def __init__(self): | ||
WebTest.__init__(self) | ||
self.login(USER, PASS) | ||
self.wait_with_folder_list() | ||
|
||
def load_profile_page(self): | ||
self.load() | ||
self.by_css('[data-source=".settings"]').click() | ||
list_item = self.by_class('menu_profiles') | ||
list_item.find_element_by_tag_name('a').click() | ||
list_item.find_element(By.TAG_NAME, 'a').click() | ||
self.wait_with_folder_list() | ||
assert self.by_class('content_title').text == 'Profiles' | ||
assert self.by_class('profile_content_title').text == 'Profiles' | ||
|
||
def add_profile(self): | ||
self.by_class('add_profile').click() | ||
|
@@ -23,6 +26,7 @@ def add_profile(self): | |
addr.send_keys('[email protected]') | ||
reply = self.by_name('profile_replyto') | ||
reply.send_keys('[email protected]') | ||
self.dropdown_test('profile_imap', 'all_email_since', '-1 week', '-5 years') | ||
sig = self.by_name('profile_sig') | ||
sig.send_keys('foo') | ||
self.by_name('profile_default').click() | ||
|
@@ -55,7 +59,7 @@ def del_profile(self): | |
print("PROFIILE TEST") | ||
test_runner(ProfileTest, [ | ||
'load_profile_page', | ||
'add_profile', | ||
'edit_profile', | ||
'del_profile' | ||
# 'add_profile', | ||
# 'edit_profile', | ||
# 'del_profile' | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.