Ejemplo n.º 1
0
def payment_change(payment_type):
    """ Change payment Information.
        @param : Instance of SeleniumTestScript class.
        @param payment_type: Payment type.

    """
    sel = selenium
    sel.click("id=radio_button1")
    sel.type("name=ccname", "test")
    sel.select("id=cctypeselect", "label=Mastercard")
    sel.type("name=ccnum", credit(payment_type))
    sel.select("name=ccmonth", "label=6")
    sel.select("name=ccyear", "label=2016")
    sel.click("id=agi-update")
    sel.wait_for_page_to_load("30000")
    verify_text("Your payment information has been changed.")
Ejemplo n.º 2
0
def pof(credit_card_type):
    """ Validate the change payment information functionality
    of AG intractive site.
        @param : instance of browser to automate
        @param credit_card_type: It's shortform of credit card name.

    """
    sel = selenium
    card_security_code = "187"

    # Updating payment information.
    wait_element("name=_cc_name")
    sel.click("name=_cc_name")
    sel.type("name=_cc_name", "TestMastercard")
    verify_element_text("TestMastercard", "name=_cc_name")
    sel.click("name=_cc_num")
    sel.type("name=_cc_num", credit(credit_card_type))
    verify_element_text(credit(credit_card_type), "name=_cc_num")
    sel.click("name=_cvv2")
    sel.type("name=_cvv2", card_security_code)
    verify_element_text(card_security_code, "name=_cvv2")
    sel.click("id=agi-update")
    sel.wait_for_page_to_load("90000")
    verify_text("You have successfully changed your payment information")