-
Notifications
You must be signed in to change notification settings - Fork 0
/
load_test_env.py
37 lines (28 loc) · 1.26 KB
/
load_test_env.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
def get_driver():
from selenium import webdriver
from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
profile = FirefoxProfile()
profile.add_extension('C:/zz_EFG/GitHub/testscript/executables/firebug-2.0.16-fx.xpi')
d = webdriver.Firefox(firefox_profile=profile)
d.implicitly_wait(7)
return d
def igo(d):
from selenium.webdriver.support.wait import WebDriverWait
d.get('http://pipepasstoigo-qd3.ipipeline.com/default.aspx?gaid=5752')
if d.current_url.find("/CossEnterpriseSuite/") == -1:
elem = d.find_element_by_name("user")
elem.clear()
elem.send_keys('tombqd5')
elem = d.find_element_by_name("password")
elem.clear()
elem.send_keys('password1')
elem = d.find_element_by_name("Submit")
elem.click()
WebDriverWait(d,30).until(lambda x: x.find_element_by_id("mycases-button"))
if d.find_elements_by_id('mycases-button'):
d.find_element_by_id('mycases-button').click()
elif d.find_elements_by_id('spanMyCases'):
d.find_element_by_id('spanMyCases').click()
WebDriverWait(d, 30).until(lambda x: x.find_element_by_id("btnNewCase"))
#http://pipepasstoigo-qd3.ipipeline.com/default.aspx?gaid=5752
#d.switch_to_frame('CossScreenFrame')