not able to import ddt in python 2.7 – Magento
import unittest from ddt import data, unpack from selenium import webdriver import ddt @ddt class searchddt(unittest.TestCase): def setUp(self): self.driver = webdriver.Chrome() self.driver.implicitly_wait(30) self.driver.maximize_window() self.driver.get('https://magento.com/products/magento-commerce') @data(("phones",2)) @unpack def test_search(self,search_val,expected_count): self.searchfield=self.driver.find_element_by_xpath("//I[@aria-hidden='true']/self::I") self.searchfield.clear() self.searchfield.send_keys(search_val) self.searchfield.submit() def tearDown(self): self.driver.quit() if __name__=='__main__': unittest.main(verbosity=2) FAILED (errors=1)…