skip to Main Content

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)…

VIEW QUESTION

Memcached – Can't load website using requests in Python

I'm using Python and I'm trying to scrape this website: https://online.ratb.ro/info/browsers.aspx But I'm getting this error: Traceback (most recent call last): File "C:UserspingulukDesktopProiecte GITRATB Scrapertest2.py", line 3, in test = requests.get('https://online.ratb.ro/info/browsers.aspx') File "C:Python27libsite-packagesrequestsapi.py", line 72, in get return request('get', url,…

VIEW QUESTION
Back To Top
Search