本文整理汇总了Python中public.login_bank.login_bank函数的典型用法代码示例。如果您正苦于以下问题:Python login_bank函数的具体用法?Python login_bank怎么用?Python login_bank使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了login_bank函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_bank_login
def test_bank_login(self):
u"""验证银行登录"""
driver=self.driver
login_bank.login_bank(self,username,password,domain)
#dis=driver.find_element_by_xpath("/html/body/div[1]").is_displayed()
username_bank=driver.find_element_by_css_selector("div.account a#userid").text
self.assertIn(username, username_bank, u"登录失败")
示例2: test_toubiaochaoe
def test_toubiaochaoe(self):
u"""测试超额投标"""
driver=self.driver
login_bank.login_bank(self)
#点击我要投资
elements_home=bank_page.home_page(self)
elements_home.get("woyaotouzi").click()
#选择第指定标进行投标
n = 0
bidname_list=driver.find_elements_by_css_selector("div.p-list ul#indexList li span.c2 a")
for bidname in bidname_list:
n+=1
if u"按月付息第1期" in bidname.text:
break
keyongbiao_list=driver.find_elements_by_css_selector(" li span.c7 a.tender-btn")
keyongbiao_list[n-1].click()
#跳转到标详情页面
elements=bank_page.woyaotouzi_tzlb(self)
#已超额,请重新输入!
jine=int(borrowamount)*10000+100
elements.get("toubiaojine").send_keys("%s"%jine)
elements.get("lijitoubiao").click()
time.sleep(2)
chaoetishi = driver.find_element_by_css_selector("table.aui_dialog tbody tr td.aui_main div.aui_content").text
self.assertEqual(u"已超额,请重新输入!", chaoetishi, u"超额投标失败")
time.sleep(1)
示例3: test_message
def test_message(self):
u"""message页面是否正常"""
driver = self.driver
login_bank.login_bank(self,username,password,domain)
time.sleep(2)
driver.find_element_by_css_selector("a#msg_warp.msg_warp i.fa").click()
xitongtongzhi = driver.find_element_by_css_selector("div.mainContent div.h-title h3").text
self.assertEqual(u"系统通知", xitongtongzhi, u"系统通知页面异常")
示例4: setUpClass
def setUpClass(self):
#self.driver = webdriver.Firefox()
self.driver=webdriver.Remote("%s"%self.remoteip,webdriver.DesiredCapabilities.FIREFOX)
self.driver.maximize_window()
self.driver.implicitly_wait(15)
#login_bank.login_bank(self,do )
login_bank.login_bank(self,username,password,domain)
time.sleep(2)
示例5: toubiao
def toubiao():
con=Bankunion_proc()
biao_id=con.back_biaoid(bankname=domain,bidstatus=16,value_way=2,product_type=1)
login_bank.login_bank(self,username,password,domain)
driver.get(base_url+'/bid/content/'+str(biao_id))
#跳转到标详情页面
elements=bank_page.woyaotouzi_tzlb(self)
#已超额,请重新输入!
jine=int(return_bidconf('borrowamount'))*10000+100
elements.get("toubiaojine").send_keys("%s"%jine)
elements.get("lijitoubiao").click()
time.sleep(2)
chaoetishi = driver.find_element_by_css_selector("table.aui_dialog tbody tr td.aui_main div.aui_content").text
self.assertEqual(u"已超额,请重新输入!", chaoetishi, u"超额投标失败")
time.sleep(1)
示例6: test_tixian
def test_tixian(self):
u"""提现成功 """
driver=self.driver
login_bank.login_bank(self,username,password,domain)
time.sleep(4)
#点击我要提现
driver.find_element_by_css_selector("section.safe div.bd div.leftMenu ul li a[href='/my/cash']").click()
#录入提现金额
driver.find_element_by_css_selector(" div.c-area form.cashBoxForm ul li.cf input#moneyTix.fl").send_keys('100')
#录入交易密码
driver.find_element_by_css_selector(' div.recharge div.c-area form.cashBoxForm ul li.cf input.fl[name="tradePwd"]').send_keys(password)
#点击提现
driver.find_element_by_css_selector("div.recharge div.c-area form.cashBoxForm ul li.sub input.normalBtn").click()
time.sleep(2)
#点击确定
driver.find_element_by_css_selector(" div.aui_buttons button.aui_state_highlight").click()
time.sleep(2)
#提现申请已经提交
tixian_text=driver.find_element_by_css_selector(" div.aui_inner table.aui_dialog tbody tr td.aui_main div.aui_content").text
self.assertEqual(tixian_text, u'提现申请已提交!', u'提现失败')
示例7: test_toubiao_2
def test_toubiao_2(self):
u"""测试投标后投标人次增加"""
driver=self.driver
login_bank.login_bank(self)
#点击我要投资
elements_home=bank_page.home_page(self)
elements_home.get("woyaotouzi").click()
#选择第一个投标按钮进行投标
keyongbiao=driver.find_elements_by_css_selector(" li span.c7 a.tender-btn")
keyongbiao[0].click()
#跳转到标详情页面
elements=bank_page.woyaotouzi_tzlb(self)
#投标前投标人数
toubiao_num_before=int(driver.find_element_by_css_selector("h3.bright span#count").text)
elements.get("toubiaojine").send_keys("100")
elements.get("lijitoubiao").click()
driver.find_element_by_css_selector("div.aui_buttons button.aui_state_highlight[type='button']").click()
time.sleep(2)
#投标后人投标人数
toubiao_num_after=int(driver.find_element_by_css_selector("h3.bright span#count").text)
self.assertEqual(toubiao_num_before+1,toubiao_num_after,u"投标记录未增加")
示例8: test_woyaojiekuan
def test_woyaojiekuan(self):
u"""我要借款"""
driver=self.driver
login_bank.login_bank(self)
elements_home=bank_page.home_page(self)
elements_home.get("woyaojiekuan").click()
elements_jiekuan=bank_page.woyaojiekuan(self)
elements_jiekuan.get("tongyi").click()
elements_jiekuan.get("huoquyanzhengma").click()
time.sleep(5)
yanzhengma=Bankunion_proc().back_random_code(username_input)
elements_jiekuan.get("yanzhengma").send_keys(yanzhengma)
elements_jiekuan.get("suozaidiqu").send_keys(u"北京")
elements_jiekuan.get("daikuanjine").send_keys("1")
elements_jiekuan.get("yueshu").click()
elements_jiekuan.get("sangeyue").click()
elements_jiekuan.get("tijiaoshenqing").click()
time.sleep(2)
chenggong=driver.find_element_by_css_selector("tbody tr td.aui_main div.aui_content").text
self.assertEqual(chenggong, u"成功!", u"借款失败")
driver.find_element_by_css_selector(" button.aui_state_highlight").click()
time.sleep(2)
示例9: test_icbc
def test_icbc(self):
u"""跳转工商银行"""
driver=self.driver
login_bank.login_bank(self)
#点击充值按钮
time.sleep(1)
driver.get(self.base_url+'/my')
driver.find_element_by_css_selector("div.bd:nth-child(2) div.payCash a[href='/my/pay'][class='payBtn fl']").click()
driver.find_element_by_css_selector("ul.cf li label img[src$='icbc.png']").click()
driver.find_element_by_css_selector("li input#money.active").send_keys("100")
driver.find_element_by_css_selector("li input#chongzhi").click()
now_window=driver.current_window_handle
#点击弹出确定按钮
driver.find_element_by_css_selector("div.aui_buttons button.aui_state_highlight").click()
time.sleep(3)
all_windows=driver.window_handles
current_url=''
for window in all_windows:
if window !=now_window:
driver.switch_to_window(window)
driver.find_elements_by_xpath("/html/body/table")
current_url=driver.current_url
self.assertIn(u"b2c.icbc.com.cn",current_url,u"工商银行跳转失败")
示例10: test_toubiao_1
def test_toubiao_1(self):
u"""测试投标后金额减少"""
driver=self.driver
login_bank.login_bank(self)
#点击我要投资
elements_home=bank_page.home_page(self)
elements_home.get("woyaotouzi").click()
#选择第一个投标按钮进行投标
keyongbiao=driver.find_elements_by_css_selector(" li span.c7 a.tender-btn")
keyongbiao[0].click()
#跳转到标详情页面
elements=bank_page.woyaotouzi_tzlb(self)
wodeyue=elements.get("wodeyue").get_attribute("num")
print u"投标前余额",wodeyue
elements.get("toubiaojine").send_keys("100")
elements.get("lijitoubiao").click()
driver.find_element_by_css_selector("div.aui_buttons button.aui_state_highlight[type='button']").click()
time.sleep(2)
now_yue=driver.find_element_by_css_selector(" span#yi span#memberyue").get_attribute("num")
#now_yue_e=WebDriverWait(driver,10).until(lambda x:x.find_element_by_css_selector(" span#yi span#memberyue"))
print u"投标后余额",now_yue
toubiaojine=float(wodeyue)-float(now_yue)
self.assertEqual(toubiaojine, 100.0, u"用户余额未减少")
示例11: test_ccb
def test_ccb(self):
u"""跳转建设银行"""
driver=self.driver
login_bank.login_bank(self)
#点击充值按钮
time.sleep(1)
driver.get(self.base_url+'/my')
driver.find_element_by_css_selector("div.bd:nth-child(2) div.payCash a[href='/my/pay'][class='payBtn fl']").click()
driver.find_element_by_css_selector("ul.cf li label img[src$='ccb.png']").click()
driver.find_element_by_css_selector("li input#money.active").send_keys("100")
driver.find_element_by_css_selector("li input#chongzhi").click()
now_window=driver.current_window_handle
#点击弹出确定按钮
driver.find_element_by_css_selector("div.aui_buttons button.aui_state_highlight").click()
time.sleep(3)
all_windows=driver.window_handles
current_url=''
for window in all_windows:
if window !=now_window:
driver.switch_to_window(window)
driver.find_element_by_css_selector("div#PayContainer.PayForContainer_Head div.PayForContainer_Head_WebService")
current_url=driver.current_url
print current_url
self.assertIn(u"ccb.com.cn",current_url,u"建设银行跳转失败")
示例12: test_cmb
def test_cmb(self):
u"""跳转招商银行"""
driver=self.driver
login_bank.login_bank(self)
#点击充值按钮
time.sleep(1)
driver.get(self.base_url+'/my')
driver.find_element_by_css_selector("div.bd:nth-child(2) div.payCash a[href='/my/pay'][class='payBtn fl']").click()
driver.find_element_by_css_selector("ul.cf li label img[src$='cmb.png']").click()
driver.find_element_by_css_selector("li input#money.active").send_keys("100")
driver.find_element_by_css_selector("li input#chongzhi").click()
now_window=driver.current_window_handle
#点击弹出确定按钮
driver.find_element_by_css_selector("div.aui_buttons button.aui_state_highlight").click()
time.sleep(3)
all_windows=driver.window_handles
current_url=""
for window in all_windows:
if window !=now_window:
driver.switch_to_window(window)
driver.find_element_by_css_selector(" div.divPageBg div div#AllElementContainer div")
current_url=driver.current_url
print current_url
self.assertIn(u"netpay.cmbchina.com",current_url,u"招商银行跳转失败")
示例13: test_bos
def test_bos(self):
u"""跳转上海银行"""
driver=self.driver
login_bank.login_bank(self,username,password,domain)
#点击充值按钮
time.sleep(1)
driver.get(self.base_url+'/my')
driver.find_element_by_css_selector("div.bd:nth-child(2) div.payCash a[href='/my/pay'][class='payBtn fl']").click()
driver.find_element_by_css_selector("ul.cf li label img[src$='bos.jpg']").click()
driver.find_element_by_css_selector("li input#money.active").send_keys("100")
driver.find_element_by_css_selector("li input#chongzhi").click()
now_window=driver.current_window_handle
#点击弹出确定按钮
driver.find_element_by_css_selector("div.aui_buttons button.aui_state_highlight").click()
time.sleep(3)
all_windows=driver.window_handles
current_url=''
for window in all_windows:
if window !=now_window:
driver.switch_to_window(window)
driver.find_elements_by_xpath("/html/body/div[2]/div/div[2]")
current_url=driver.current_url
print current_url
self.assertIn(u"epay.bankofshanghai.com",current_url,u"上海银行跳转失败")