from needle.cases import NeedleTestCase
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as ec


class TestLogo(NeedleTestCase):

    def test_logo(self):
        self.driver.get('http://www.bbc.co.uk/news/')
        try:
                WebDriverWait(self.driver, 20).until(
                    ec.presence_of_element_located((By.ID, "blq-mast"))
            )
        finally:
            pass
        self.assertScreenshot('#blq-mast', 'bbc-masthead')
from needle.cases import NeedleTestCase
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as ec


class TestLogo(NeedleTestCase):

    def test_logo(self):
        self.driver.get('http://www.bbc.co.uk/news/')
        try:
                WebDriverWait(self.driver, 20).until(
                    ec.presence_of_element_located((By.ID, "idcta-link"))
            )
        finally:
            pass
        self.assertScreenshot('#idcta-link', 'bbc-masthead')
Fix locators used in needle example on BBC site
Fix locators used in needle example on BBC site

  from needle.cases import NeedleTestCase
  from selenium.webdriver.common.by import By
  from selenium.webdriver.support.ui import WebDriverWait
  from selenium.webdriver.support import expected_conditions as ec
  
  
  class TestLogo(NeedleTestCase):
  
      def test_logo(self):
          self.driver.get('http://www.bbc.co.uk/news/')
          try:
                  WebDriverWait(self.driver, 20).until(
-                     ec.presence_of_element_located((By.ID, "blq-mast"))
+                     ec.presence_of_element_located((By.ID, "idcta-link"))
              )
          finally:
              pass
-         self.assertScreenshot('#blq-mast', 'bbc-masthead')
+         self.assertScreenshot('#idcta-link', 'bbc-masthead')
Fix locators used in needle example on BBC site
## Code Before:
from needle.cases import NeedleTestCase
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as ec


class TestLogo(NeedleTestCase):

    def test_logo(self):
        self.driver.get('http://www.bbc.co.uk/news/')
        try:
                WebDriverWait(self.driver, 20).until(
                    ec.presence_of_element_located((By.ID, "blq-mast"))
            )
        finally:
            pass
        self.assertScreenshot('#blq-mast', 'bbc-masthead')
## Instruction:
Fix locators used in needle example on BBC site
## Code After:
from needle.cases import NeedleTestCase
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as ec


class TestLogo(NeedleTestCase):

    def test_logo(self):
        self.driver.get('http://www.bbc.co.uk/news/')
        try:
                WebDriverWait(self.driver, 20).until(
                    ec.presence_of_element_located((By.ID, "idcta-link"))
            )
        finally:
            pass
        self.assertScreenshot('#idcta-link', 'bbc-masthead')