-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
31 lines (27 loc) · 875 Bytes
/
Copy pathtest.py
File metadata and controls
31 lines (27 loc) · 875 Bytes
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
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
TESTINIUM_USER="canberk"
TESTINIUM_PASS="dc21f489b133c5cc058450eeb195be34"
Key =TESTINIUM_USER+':'+TESTINIUM_PASS
desired_cap = {
'platform': "WIN8_1",
'browserName': "firefox",
'version': "47",
'takesScreenshot':True,
'recordsVideo':True,
'screenResolution':'XGA',
'key':Key
}
driver = webdriver.Remote(
command_executor='http://hub.testinium.io/wd/hub',
desired_capabilities=desired_cap)
driver.implicitly_wait(10)
driver.get("http://www.amazon.com")
if not "Amazon" in driver.title:
raise Exception("Unable to load amazon page!")
elem = driver.find_element_by_id("twotabsearchtextbox")
elem.send_keys("Superman Comics")
elem.submit()
print driver.title
driver.quit()