I'm trying to use send_keys to fill a field and in the same time, store this value in a variable. When I run this code, the text of the variable is not printed.
locators.py
from selenium.webdriver.common.by import By
class CreateNewContractor(object):
FIRST_NAME = (By.ID, "id_0-first_name")
pages.py
from locators import *
class CreateNewContractor1(Page):
def fill_contractor(self):
email = self.find_element(*CreateNewContractor.FIRST_NAME).send_keys("Hello")
email.text
print email
How can I store and print the text filled in the email variable?
email.get_attribute('value')