-
Notifications
You must be signed in to change notification settings - Fork 0
/
EdirAddressCheckout.py
29 lines (28 loc) · 1.06 KB
/
EdirAddressCheckout.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
import unittest
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException, WebDriverException
import TestHelper
import Checkout
class navigateToCheckout(unittest.TestCase):
def test_2(self):
self.driver = webdriver.Firefox()
self.driver.get(TestHelper.server)
navigate = Checkout.VipOutletTestCheckout(self.driver)
navigate.test_1_register()
addNewCreditCard = TestHelper.AddAddressCheckout(self.driver)
while True:
try:
placeOrder = TestHelper.AddAddressCheckout(self.driver)
placeOrder.placeOrder()
except WebDriverException:
print "Unable to click Place Order, retrying"
else:
break
while True:
try:
orderIdElement = self.driver.find_element_by_css_selector(TestHelper.orderId)
orderIdElement.click()
except WebDriverException:
print "Unable to click Order ID, retrying"
else:
break