Пример #1
0
 def test_3_contact_form(self):
     driver = self.driver
     driver.get("https://*****:*****@staging.caktusgroup.com")
     # Use the POM class to navigate to contact page
     navigation = TopNav(driver)
     navigation.nav_to_contact()
     # Use the POM class to enter text in the contact form
     form = ContactForm(driver)
     form.first_name("MRtest")
     form.last_name("LastName")
     form.email("*****@*****.**")
Пример #2
0
 def test_2_count_blog_cards(self):
     driver = self.driver
     driver.get("https://*****:*****@staging.caktusgroup.com")
     # use the page object to nav to blog page instead of find element here
     navigation = TopNav(driver)
     navigation.nav_to_blog()
     # click view more posts and wait(sleep)
     driver.find_element_by_id("next").click()
     sleep(3)
     # count the number of cards
     posts_count = driver.find_elements_by_class_name(
         "card-common--image_container")
     # veify the number of posts that display
     assert (len(posts_count) == 12)
Пример #3
0
 def test_count_blog_cards(self):
     # Verify that clicking view more on the blog page loads 6 more posts for a total of 12
     TopNav(self.driver).blog()
     # click view more posts and wait(sleep)
     Blog(self.driver).load_more()
     sleep(2)
     # count the number of cards
     posts_count = self.driver.find_elements(
         *BlogLocators.blog_cards_images)
     # verify the number of posts that display
     assert (len(posts_count) == 12)
Пример #4
0
 def test_contact_form(self):
     # Use the POM class to navigate to contact page
     TopNav(self.driver).contact()
     # Use the POM class to enter text in the contact form
     ContactForm(self.driver).first_name("test")
     ContactForm(self.driver).last_name("LastName")
     ContactForm(self.driver).email("*****@*****.**")
     ContactForm(self.driver).submit()
     # verify that an error is displayed for the required field that was not entered
     element = WebDriverWait(
         self.driver,
         10).until(lambda x: x.find_element(*ContactLocators.hubspot_error))
     assert element.is_displayed()
Пример #5
0
 def test_technical_topic(self):
     # Verify that the topics on the first 3 cards include 'Technical'
     TopNav(self.driver).blog()
     Blog(self.driver).technical_filter()
     self.assertIn(
         "Technical",
         self.driver.find_element(*BlogLocators.first_card_topics).text)
     self.assertIn(
         "Technical",
         self.driver.find_element(*BlogLocators.second_card_topics).text)
     self.assertIn(
         "Technical",
         self.driver.find_element(*BlogLocators.third_card_topics).text)
Пример #6
0
 def test_hero_button_loads_services_page(self):
     # Verify that the button in the hero image loads the services page
     TopNav(self.driver).logo()
     Homepage(self.driver).hero_image_button()
     assert self.driver.title == PageTitles.services
Пример #7
0
 def test_view_more_events(self):
     # Verify that clicking the view more events button loads the events page
     TopNav(self.driver).blog()
     Blog(self.driver).more_events_button()
     assert self.driver.title == PageTitles.events
Пример #8
0
 def test_servicedetail_contact_button(self):
     # Verify that the contact button on services page opens the contact page
     TopNav(self.driver).services()
     Services(self.driver).first_card()
     ServiceDetail(self.driver).contact_button()
     assert self.driver.title == PageTitles.contact
Пример #9
0
 def test_team_bio_link(self):
     TopNav(self.driver).about_us_nav()
     AboutUs(self.driver).colin_bio()
     assert self.driver.title == PageTitles.colin
Пример #10
0
 def test_view_services_button(self):
     # Verify that the services button takes the user to the services page
     TopNav(self.driver).logo()
     Homepage(self.driver).view_services_button()
     assert self.driver.title == PageTitles.services
Пример #11
0
 def test_read_our_case_studies_button(self):
     # Verify that the read our case studies button takes user to correct page
     TopNav(self.driver).logo()
     Homepage(self.driver).read_our_case_studies()
     assert self.driver.title == PageTitles.casestudies
Пример #12
0
 def test_pyladies_link(self):
     TopNav(self.driver).about_us_nav()
     AboutUs(self.driver).pyladies()
     TestUtils(self.driver).switch_new_tab()
     assert self.driver.title == PageTitles.pyladies
Пример #13
0
 def test_django_girls_link(self):
     TopNav(self.driver).about_us_nav()
     AboutUs(self.driver).django_girls()
     TestUtils(self.driver).switch_new_tab()
     assert self.driver.title == PageTitles.django_girls
Пример #14
0
 def test_code_durham_link(self):
     TopNav(self.driver).about_us_nav()
     AboutUs(self.driver).code_durham()
     TestUtils(self.driver).switch_new_tab()
     assert self.driver.title == PageTitles.code_for_durham, print(
         self.driver.title)
Пример #15
0
 def test_girl_dev_it_link(self):
     TopNav(self.driver).about_us_nav()
     AboutUs(self.driver).girl_dev_it()
     TestUtils(self.driver).switch_new_tab()
     assert self.driver.title == PageTitles.girl_dev_it
Пример #16
0
 def test_women_in_tech_link(self):
     TopNav(self.driver).about_us_nav()
     AboutUs(self.driver).women_in_tech()
     TestUtils(self.driver).switch_new_tab()
     print(self.driver.title)
     assert self.driver.title == PageTitles.durham_women_in_tech
Пример #17
0
 def test_our_contributions_button(self):
     TopNav(self.driver).about_us_nav()
     AboutUs(self.driver).browse_contributions_button()
     TestUtils(self.driver).switch_new_tab()
     assert self.driver.current_url == PageTitles.github_url
Пример #18
0
 def test_were_hiring_button(self):
     TopNav(self.driver).about_us_nav()
     AboutUs(self.driver).were_hiring_button()
     assert self.driver.title == PageTitles.careers
Пример #19
0
 def test_success_model_link(self):
     TopNav(self.driver).logo()
     Homepage(self.driver).why_caktus_success_model()
     assert self.driver.title == PageTitles.success_model_blog
Пример #20
0
 def test(self):
     TopNav(self.driver).careers()
     assert self.driver.title == PageTitles.careers
Пример #21
0
 def test_homepage_service_card_6(self):
     TopNav(self.driver).logo()
     Homepage(self.driver).service_card_6()
     assert self.driver.title == PageTitles.service_card_6
Пример #22
0
 def test_servicedetail_see_more(self):
     # Verify the see more breadcrumb on service detail page opens services page
     TopNav(self.driver).services()
     Services(self.driver).first_card()
     ServiceDetail(self.driver).see_more()
     assert self.driver.title == PageTitles.services
Пример #23
0
 def test_featured_casestudy_card(self):
     # Verify the featured case study on the homepage takes the user to the correct page
     TopNav(self.driver).logo()
     Homepage(self.driver).featured_case_study()
     assert self.driver.title == PageTitles.featured_casestudy
Пример #24
0
 def test_blog_page_title(self):
     # Navigates to the blog with the top navigation and verifies the title includes the word Blog
     TopNav(self.driver).blog()
     # verify that Blog is in the title of the blog page
     assert self.driver.title == PageTitles.blog
Пример #25
0
 def test_resource_blog_card_title(self):
     # Verify that the blog link in resource card takes user to blog page
     TopNav(self.driver).logo()
     Homepage(self.driver).resources_blog_card_title()
     assert self.driver.title == PageTitles.blog
Пример #26
0
 def test_(self):
     # Verify that the Our Work option in the top nav loads the /casestudies page
     TopNav(self.driver).our_work()
     assert self.driver.title == PageTitles.casestudies
Пример #27
0
 def test_services_sixth_card(self):
     TopNav(self.driver).services()
     Services(self.driver).sixth_card()
     assert self.driver.title == PageTitles.service_card_6
Пример #28
0
 def test_view_more_press(self):
     TopNav(self.driver).about_us_nav()
     AboutUs(self.driver).view_more_press_button()
     assert self.driver.title == PageTitles.press