Пример #1
0
#!/usr/bin/python
# -*- coding: UTF-8 -*-
import unittest
import time
import datetime
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from core import mobile_test_core
from utils import env_util, mobile_util

WEB_SITE = env_util.get_env_url()
FOOTER = [[
    u'' + WEB_SITE + 'start-your-business', u'Business Ideas',
    u'Business Plans', u'Startup Basics', u'Startup Funding', u'Franchising',
    u'Success Stories', u'Entrepreneurs'
],
          [
              u'' + WEB_SITE + 'grow-your-business', u'Sales & Marketing',
              u'Finances', u'Your Team', u'Technology', u'Social Media',
              u'Security'
          ],
          [
              u'' + WEB_SITE + 'build-your-career', u'Get the Job',
              u'Get Ahead', u'Office Life', u'Work-Life Balance',
              u'Home Office'
          ],
          [
              u'' + WEB_SITE + 'lead-your-team', u'Leadership',
              u'Women in Business', u'Managing', u'Strategy',
              u'Personal Growth'
Пример #2
0
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import unittest
import sys
import os

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from core import mobile_test_core
from utils import env_util  #, ad_util

# profile = webdriver.FirefoxProfile('C:\\Users\\shizuleuski\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\dfyhvard.default')
# driver = webdriver.Firefox(profile)

QUIZ_URL = env_util.get_env_url() + "5004-job-interview-quiz.html"
TEXT_SCORE = "You Scored 0%"
TEXT_WELCOME = "Test your knowledge on what hiring managers expect during a job interview."


class QuizCase(mobile_test_core.MobileTestCore):
    def testGetTheScore(self):
        def go_to_the_last():
            self.driver.get(QUIZ_URL)
            #ad_util.verifyAdLoadsAndClose(self.driver)
            for i in range(11):
                self.driver.execute_script("""$("#quiz_action").mousedown()""")

        go_to_the_last()
        a = self.driver.find_element_by_class_name("score").text
        self.assertEqual(a, TEXT_SCORE,
                         "{0} doesn't match {1}".format(a, TEXT_SCORE))
Пример #3
0
#!/usr/bin/python
# -*- coding: UTF-8 -*-

from selenium import webdriver
import unittest
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from core import test_core
from utils import env_util, webdriver_util  #,ad_util

# profile = webdriver.FirefoxProfile('C:\\Users\\shizuleuski\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\dfyhvard.default')
# driver = webdriver.Firefox(profile)

BIG_URL = env_util.get_env_url() + "3253-business-idea-generator.html"
browsers = {
    "firefox": webdriver.Firefox,
    "ie": webdriver.Ie,
    "chrome": webdriver.Chrome
}
#TEXT_FIRST_SLIDE = "Based on your responses, you may be a good fit to own and operate a retail store. Owning a retail, whether it's selling clothes, books, or furniture, will require a large investment. In also will mean you will need to hire employees and manage them successfully. Since most retail owners are very hands-on, it will give you the chance work with customers on a daily basis and show off your salesperson skills. After seeing a number of businesses go under during the recession, some may have doubts on how successful a retail store can be. Despite a lingering economic uncertainty, research from the U.S. Census Bureau shows Americans are spending again. Overall retail sales in July were up 4.1 percent from a year ago, with certain types of retail doing even better. Sporting goods, hobby, book and music stores saw sales increase by more than 10 percent from last year. The retail industry gives you all sorts of business options. The North American Industry Classification System has identified nearly 70 different types of retail ventures. Jewelry, art, auto parts, office supplies, luggage, clothing, souvenirs, food, hardware and computers can all be sold from a retail location."
#TEXT_FIRST_SLIDE_PAR1 = "Based on your responses, your interests and goals closely align with a business that offers writing, marketing and other creative services. This is an ideal fit for anyone from a creative background, such as art, writing, graphic design, film, public relations, architecture, event planning, and photography. Additionally, this benefits anyone looking to work remotely, since creatives operate from their homes. You have the freedom to work exclusively for yourself, on your own schedule and at your own pace."
#TEXT_FIRST_SLIDE_PAR2 = "As of January 2015, there were 702,771 businesses employing 2.9 million creatives in the United States, Americans for the Arts reported. There is a need for individuals who run creative-service businesses, and you could be one of them. According to the Creative Industry Report, nine out of 10 businesses on average can utilize a freelance employee. The same report mentions that 66 percent of businesses commission for photography and 55 percent utilize video-production services."
#TEXT_FIRST_SLIDE_PAR3 = "To establish your own creative-service business, you need internal motivation as a leader and a knack for business. The internet has created many ways for creatives to offer their talents and profit from their services. Many businesses, including online publications, want multimedia content that staff employees might not offer. Although you might consider yourself a freelancer, it might benefit you to establish yourself as an LLC, especially for tax benefits and if you plan to hire employees."
#TEXT_SECOND_SLIDE = "Based on your answer"
#TEXT_SECOND_SLIDE = "Based on your responses, you would be well-suited to the app-design industry."


class BIGTestCase(test_core.TestCore):
    def testSwitchingToLatest(self):
        def go_to_the_last():
Пример #4
0
#!/usr/bin/python
# -*- coding: UTF-8 -*-

from selenium import webdriver
import unittest
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from core import test_core
from utils import env_util

# profile = webdriver.FirefoxProfile('C:\\Users\\shizuleuski\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\dfyhvard.default')
# driver = webdriver.Firefox(profile)

WEB_SITE = env_util.get_env_url() + "TEST6891-moms-work-from-home-jobs.html"
browsers = {
    "firefox": webdriver.Firefox,
    "ie": webdriver.Ie,
    "chrome": webdriver.Chrome
}


class F04TestCase(test_core.TestCore):
    @classmethod
    def setUpClass(cls):
        super(F04TestCase, cls).setUpClass()
        driver = test_core.TestCore.driver
        try:
            driver.get(WEB_SITE)
        except Exception as e:
            driver.quit()
Пример #5
0
#!/usr/bin/python
# -*- coding: UTF-8 -*-

from selenium import webdriver
import unittest
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from core import test_core
from utils import env_util, webdriver_util

# profile = webdriver.FirefoxProfile('C:\\Users\\shizuleuski\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\dfyhvard.default')
# driver = webdriver.Firefox(profile)

WEB_SITE = env_util.get_env_url() + "8193-working-moms-stress.html"
ONE = "Build Your Career"
TWO = "Work-Life Balance"
AUTHOR = "Brittney Morgan, Business News Daily Contributing Writer"
TIME_STAMP = """July 14, 2015 09:23 am EST"""
YOUMAYLIKE = "You May Also like"

browsers = {
    "firefox": webdriver.Firefox,
    "ie": webdriver.Ie,
    "chrome": webdriver.Chrome
}


class ArticleTestCase(test_core.TestCore):
    @classmethod
    def setUpClass(cls):
Пример #6
0
#!/usr/bin/python
# -*- coding: UTF-8 -*-
          
import unittest
import time
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from core import mobile_test_core
from utils import env_util

#profile = webdriver.FirefoxProfile('C:\\Users\\shizuleuski\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\dfyhvard.default')
#driver = webdriver.Firefox(profile)

WEB_SITE = env_util.get_env_url()
NEWSLETTER = env_util.get_env_url() + "newsletter"
THANKS = "Oops, som"

class SubscribeTestCase(mobile_test_core.MobileTestCore):
    
    def testSwitchingToSubscribe(self):
        # Check the subscribe button on the homepage. Test passed if switched to the 
        #subscribe page
        self.driver.get(WEB_SITE)
        field = self.driver.find_element_by_css_selector(".formBox.bdr.unit")
        field.send_keys("*****@*****.**")
        field.submit()
        current_url = self.driver.current_url
        #Fix it
        self.assertEqual(current_url, current_url, "Url hasn't been changed")