2018-06-28 18:46:51 +00:00
|
|
|
from views.base_element import BaseButton
|
|
|
|
from views.chat_view import ChatView
|
2017-08-28 10:02:20 +00:00
|
|
|
|
2018-01-03 09:34:40 +00:00
|
|
|
|
2018-06-28 18:46:51 +00:00
|
|
|
class FaucetCommand(BaseButton):
|
2017-10-23 10:23:14 +00:00
|
|
|
def __init__(self, driver):
|
2018-06-28 18:46:51 +00:00
|
|
|
super(FaucetCommand, self).__init__(driver)
|
|
|
|
self.locator = self.Locator.xpath_selector(
|
|
|
|
"//*[contains(@text,'Get some ETH')]/preceding-sibling::*[@text='/faucet']")
|
2017-10-23 10:23:14 +00:00
|
|
|
|
2018-01-14 17:43:36 +00:00
|
|
|
|
2018-06-28 18:46:51 +00:00
|
|
|
class FaucetSendCommand(BaseButton):
|
2018-01-14 17:43:36 +00:00
|
|
|
def __init__(self, driver):
|
2018-06-28 18:46:51 +00:00
|
|
|
super(FaucetSendCommand, self).__init__(driver)
|
|
|
|
self.locator = self.Locator.xpath_selector("//*[@text='Status Testnet Faucet']")
|
2018-01-14 17:43:36 +00:00
|
|
|
|
2017-08-28 10:02:20 +00:00
|
|
|
|
2018-06-28 18:46:51 +00:00
|
|
|
class ConsoleView(ChatView):
|
2017-08-28 10:02:20 +00:00
|
|
|
def __init__(self, driver):
|
2018-01-03 09:34:40 +00:00
|
|
|
super(ConsoleView, self).__init__(driver)
|
2018-06-28 18:46:51 +00:00
|
|
|
self.faucet_command = FaucetCommand(self.driver)
|
|
|
|
self.faucet_send_command = FaucetSendCommand(self.driver)
|
2018-01-03 09:34:40 +00:00
|
|
|
|
2018-06-28 18:46:51 +00:00
|
|
|
def send_faucet_request(self):
|
|
|
|
self.commands_button.click()
|
|
|
|
self.faucet_command.click()
|
|
|
|
self.faucet_send_command.click()
|
2018-02-19 11:51:53 +00:00
|
|
|
self.send_message_button.click()
|