Initial commit

This commit is contained in:
tomeros
2021-03-24 15:13:32 +02:00
commit 7b4b578010
60 changed files with 1847 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
from app.tests.utilities import selenium_utility
import pyperclip as pc
class Result(selenium_utility.SeleniumUtility):
_url_input_locator = '//input[@id="copy-able"]'
_copy_button_locator = '//button[@id="copy-btn"]'
_total_clicks_url = '//a[@id="total-clicks-link"]'
def __init__(self, driver):
self.driver = driver
super().__init__(driver)
self.url_input = self.get_element(self._url_input_locator)
self.copy_button = self.get_element(self._copy_button_locator)
def get_input_text(self):
return self.get_element(self._url_input_locator).get_attribute('value')
def click_copy_button(self):
self.copy_button.click()
def go_to_total_clicks(self):
self.get_element(self._total_clicks_url).click()
@staticmethod
def get_clipboard_content():
text = pc.paste()
return text