Exemplo n.º 1
0
	def cancel_preapproval(self):
		cm = common()
		wait = waitModule()
		# elements.is_displayed()
		self.btn_cancel_preapproval.click()
		cm.close_alert(self.driver)
		wait.wait_for_text(self.driver, glb.msg_transaction_successfully)
Exemplo n.º 2
0
 def btn_invite_game_request(self, username):
     try:
         wait = waitModule()
         selector = self.driver.find_element_by_css_selector('div[class*="chat-window"][data-username="******"]>.chat-input>a[ng-click*="Invite"]')
         wait.wait_for_element(self.driver, selector, 'btn_invite_game_request')
         return selector
     except Exception, e:
         return False
Exemplo n.º 3
0
 def ico_close_tab_chat(self, username):
     try:
         wait = waitModule()
         selector = self.driver.find_element_by_css_selector('div[data-username="******"]>.name-bar>a')
         wait.wait_for_element(self.driver, selector, 'ico_close_tab_chat')
         return selector
     except Exception, e:
         return False
Exemplo n.º 4
0
 def tab_chat_window(self, username):
     try:
         wait = waitModule()
         selector = self.driver.find_element_by_css_selector('div[class*="chat-window"][data-username="******"]')
         wait.wait_for_element(self.driver, selector, 'tab_chat_window')
         return selector
     except Exception, e:
         return False
Exemplo n.º 5
0
 def spn_chat_typing(self, username):
     try:
         wait = waitModule()
         selector = self.driver.find_element_by_css_selector('div[class*="chat-window"][data-username="******"]>.chat-content>.chat-typing>span')
         wait.wait_for_element(self.driver, selector, 'spn_chat_typing')
         return selector
     except Exception, e:
         return False
Exemplo n.º 6
0
 def ac_convert_gcoin(self, send_email, password):
     wait = waitModule()
     invoice_id = ''
     self.txt_paypal_email.send_keys(send_email)
     self.btn_convert_gcoin.click()
     self.txt_password.send_keys(password)
     self.btn_submit.click()
     wait.wait_for_text(self.driver, glb.msg_convert_gcoin)
     invoice_id = self.lnk_invoice[0].get_attribute('href').split('=')[1]
     return invoice_id
Exemplo n.º 7
0
    def setUp(self):
        self.driver.maximize_window()
        self.wait = waitModule()
        self.cm = common()

        self.pg_login = page_login(self.driver, glb.url_signIn)
        self.pg_header = page_header(self.driver)
        self.pg_paypal = page_paypal(self.driver)
        self.pg_profile = page_profile(self.driver)
        self.tb_transaction = tab_transaction(self.driver)
        self.tab_gcoin = tab_gcoin(self.driver)
        self.pg_admin = page_admin(self.driver)
        self.pnl_preapproval = panel_preapproval(self.driver)
        self.page_invoice = page_invoice(self.driver)
Exemplo n.º 8
0
    def test01_sync_btw_tabs(self):
        lnk_current_url = ''
        wait = waitModule()

        self.pg_login.ac_login(glb.s_username, glb.s_password)
        self.pg_profile.lnk_friends_panel.click()
        self.pnl_friend.ac_open_chat_tab(glb.s_referral_username)
        self.pnl_friend.ac_open_chat_tab(glb.s_chat_username)
        lnk_current_url = self.driver.current_url
        ActionChains(self.driver).send_keys(Keys.CONTROL, "t").perform()
        self.driver.get(lnk_current_url)

        time.sleep(8)
        assert self.pnl_friend.tab_chat_window(glb.s_referral_username).is_displayed(), 'Open %s chat tab completely.' % glb.s_referral_username
        assert self.pnl_friend.tab_chat_window(glb.s_chat_username).is_displayed(), 'Open %s chat tab completely.' % glb.s_chat_username
Exemplo n.º 9
0
 def ac_login(self, username, password):
     wait = waitModule()
     self.txt_username.send_keys(username)
     self.txt_password.send_keys(password)
     self.btn_submit_login.click()
     wait.wait_for_text(self.driver, 'Account Settings')
Exemplo n.º 10
0
 def lbl_online_status(self, username):
     wait = waitModule()
     selector = self.driver.find_element_by_css_selector('div[data-username="******"]>span')
     wait.wait_for_element(self.driver, selector, 'lbl_online_status')
     return selector
Exemplo n.º 11
0
 def btn_friend_chat(self, username):
 	wait = waitModule()
 	selector = self.driver.find_element_by_css_selector('div[data-username="******"]>a')
 	wait.wait_for_element(self.driver, selector, 'btn_friend_chat')
 	return selector
Exemplo n.º 12
0
 def txt_input_message(self, username):
     wait = waitModule()
     selector = self.driver.find_element_by_css_selector('[data-username="******"]>.chat-input>input')
     wait.wait_for_element(self.driver, selector, 'txt_input_message')
     return selector