def test_01_normal_goods_paid_by_card(self): home.home_page().wait_page() home.home_page().click_account_button() change_country("United States") self.press_back_to_home() home.home_page().click_search_button() search_goods_by_id(self.test_data['normal_goods_id']) buy_goods_with_attr(self.test_data['normal_goods_attr']) bag.bag_page().wait_page() bag.bag_page().click_checkout_button() checkout.checkout_page().wait_page() change_shipping_address_with_country("United States") checkout.checkout_page().click_place_order_button() time.sleep(10.0) self.screenshot()
def test_03_normal_goods_paid_by_dotpay_Poland(self): home.home_page().wait_page() home.home_page().click_account_button() change_country("Poland") self.press_back_to_home() home.home_page().click_search_button() search_goods_by_id(self.test_data['normal_goods_id']) buy_goods_with_attr(self.test_data['normal_goods_attr']) bag.bag_page().wait_page() bag.bag_page().click_checkout_button() checkout.checkout_page().wait_page() change_shipping_address_with_country("poland") checkout.checkout_page().change_payment_method("Dotpay") checkout.checkout_page().click_place_order_button() time.sleep(10.0) self.screenshot()
def test_10_normal_goods_COD(self): home.home_page().wait_page() home.home_page().click_account_button() change_country("Kuwait") self.press_back_to_home() home.home_page().click_search_button() search_goods_by_id(self.test_data['cod_goods_id']) buy_goods_with_attr_by_cod(self.test_data['cod_goods_attr']) bag.bag_page().wait_page() bag.bag_page().click_checkout_button() checkout.checkout_page().wait_page() change_shipping_address_with_country("Kuwait") checkout.checkout_page().change_payment_method("Cash On Delivery") checkout.checkout_page().click_place_order_button() time.sleep(10.0) self.screenshot()
def test_04_normal_goods_paid_by_ideal_Netherlands(self): home.home_page().wait_page() home.home_page().click_account_button() change_country("Netherlands") self.press_back_to_home() home.home_page().click_search_button() search_goods_by_id(self.test_data['cod_goods_id']) buy_goods_with_attr(self.test_data['cod_goods_attr']) bag.bag_page().wait_page() bag.bag_page().click_checkout_button() checkout.checkout_page().wait_page() change_shipping_address_with_country("netherlands") checkout.checkout_page().change_payment_method("iDeal") checkout.checkout_page().click_place_order_button() time.sleep(10.0) self.screenshot()
def change_shipping_address_with_country(country_name): checkout.checkout_page().click_default_address() shipping_address.shipping_address_page().wait_page() shipping_address.shipping_address_page().select_default_address( country_name) checkout.checkout_page().wait_page()
def test_07_normal_goods_Russia(self): home.home_page().wait_page() home.home_page().click_account_button() change_country("Russian Federation") self.press_back_to_home() home.home_page().click_search_button() search_goods_by_id(self.test_data['normal_goods_id']) buy_goods_with_attr(self.test_data['normal_goods_attr']) bag.bag_page().wait_page() bag.bag_page().click_checkout_button() checkout.checkout_page().wait_page() change_shipping_address_with_country("Russia") checkout.checkout_page().change_payment_method("QIWI Wallet ") checkout.checkout_page().click_place_order_button() time.sleep(10.0) self.screenshot() self.press_back_until_special_element( 'com.vova.android:id/check_button') search_goods_by_id(self.test_data['normal_goods_id']) buy_goods_with_attr(self.test_data['normal_goods_attr']) bag.bag_page().wait_page() bag.bag_page().click_checkout_button() checkout.checkout_page().wait_page() checkout.checkout_page().change_payment_method("Yandex Money") checkout.checkout_page().click_place_order_button() time.sleep(10.0) self.screenshot()
def test_06_normal_goods_indonesia(self): home.home_page().wait_page() home.home_page().click_account_button() change_country("Indonesia") self.press_back_to_home() home.home_page().click_search_button() search_goods_by_id(self.test_data['normal_goods_id']) buy_goods_with_attr(self.test_data['normal_goods_attr']) bag.bag_page().wait_page() bag.bag_page().click_checkout_button() checkout.checkout_page().wait_page() change_shipping_address_with_country("Indonesia") checkout.checkout_page().change_payment_method("Bank Transfers") checkout.checkout_page().click_place_order_button() time.sleep(10.0) self.screenshot() self.press_back_until_special_element( 'com.vova.android:id/check_button') search_goods_by_id(self.test_data['normal_goods_id']) buy_goods_with_attr(self.test_data['normal_goods_attr']) bag.bag_page().wait_page() bag.bag_page().click_checkout_button() checkout.checkout_page().wait_page() checkout.checkout_page().change_payment_method("Alfamart") checkout.checkout_page().click_place_order_button() time.sleep(10.0) self.screenshot() self.press_back_until_special_element( 'com.vova.android:id/check_button') search_goods_by_id(self.test_data['normal_goods_id']) buy_goods_with_attr(self.test_data['normal_goods_attr']) bag.bag_page().wait_page() bag.bag_page().click_checkout_button() checkout.checkout_page().wait_page() checkout.checkout_page().change_payment_method("OVO CASH") checkout.checkout_page().click_place_order_button() time.sleep(10.0) self.screenshot()
def test_05_normal_goods_india(self): home.home_page().wait_page() home.home_page().click_account_button() change_country("India") self.press_back_to_home() home.home_page().click_search_button() search_goods_by_id(self.test_data['normal_goods_id']) buy_goods_with_attr(self.test_data['normal_goods_attr']) bag.bag_page().wait_page() bag.bag_page().click_checkout_button() checkout.checkout_page().wait_page() change_shipping_address_with_country("india") checkout.checkout_page().change_payment_method("UPI") checkout.checkout_page().input_PAN(self.PAN) self.set_original_ime() checkout.checkout_page().click_place_order_button() time.sleep(10.0) self.screenshot() self.press_back_until_special_element( 'com.vova.android:id/check_button') search_goods_by_id(self.test_data['normal_goods_id']) buy_goods_with_attr(self.test_data['normal_goods_attr']) bag.bag_page().wait_page() bag.bag_page().click_checkout_button() checkout.checkout_page().wait_page() checkout.checkout_page().change_payment_method("India Net Banking") checkout.checkout_page().input_PAN(self.PAN) self.set_original_ime() checkout.checkout_page().click_place_order_button() time.sleep(10.0) self.screenshot()