Beispiel #1
0
class RegistrationBaseTestCase(TestCase):
    def setUp(self):
        self.driver = webdriver.Firefox()
        self.driver.maximize_window()
        self.login_page = LoginPage(self.driver)
        self.login_page.load()

    def tearDown(self):
        self.driver.close()
Beispiel #2
0
def login():
    # Web scrapper for infinite scrolling page
    driver = webdriver.Chrome(
        executable_path=r"C:/Users/jakob/chromedriver.exe")
    #driver.get("https://web.whatsapp.com/")
    time.sleep(2)  # Allow 2 seconds for the web page to open

    login_page = LoginPage(driver)
    login_page.load()
    input("Please use the QR-Code")
    return driver
Beispiel #3
0
    def setUpClass(cls):
        cls.driver = webdriver.Firefox()
        cls.driver.maximize_window()

        # Manually login in
        cls.login_page = LoginPage(cls.driver)
        cls.login_page.load()
        time.sleep(7)
Beispiel #4
0
 def setUp(self):
     self.driver = webdriver.Firefox()
     self.driver.maximize_window()
     self.login_page = LoginPage(self.driver)
     self.login_page.load()
Beispiel #5
0
from selenium import webdriver

from simon.accounts.pages import LoginPage
from simon.chat.pages import ChatPage
from simon.chats.pages import PanePage
from simon.header.pages import HeaderPage

# Creating the driver (browser)
driver = webdriver.Chrome(
    executable_path=
    "C:\\Program Files\\Google\\Chrome\\Application\\chromedriver.exe")

# Login
#	   and uncheck the remember check box
#	   (Get your phone ready to read the QR code)
login_page = LoginPage(driver)
login_page.load()
time.sleep(7)

# 1. Get all opened chats
#	   opened chats are the one chats or conversations
#	   you already have in your whatsapp.
#	   IT WONT work if you are looking for a contact
#	   you have never started a conversation.
pane_page = PanePage(driver)

# get all chats
# opened_chats = pane_page.opened_chats

# iterating over them
#print("chat:")
Beispiel #6
0
import time

from selenium import webdriver

from simon.accounts.pages import LoginPage
from simon.header.pages import HeaderPage
from simon.pages import BasePage

# Creating the driver (browser)
driver = webdriver.Firefox()
driver.maximize_window()

# 1. Login
#       and uncheck the remember check box
#       (Get your phone ready to read the QR code)
login_page = LoginPage(driver)
login_page.load()
login_page.remember_me = False
time.sleep(7)

# 2. The base page is inherited by all pages
#       and here you can check whether any
#       page is available on the screen of
#       the browser.

# we don't need to load the pages as whatsapp
# web works as one-page web app
base_page = BasePage(driver)
base_page.is_title_matches()
base_page.is_welcome_page_available()
base_page.is_nav_bar_page_available()