skip to Main Content

Facing "TypeError: object of type 'WebElement' has no len()" while executing the below script – Magento

Iam trying to check whether the product is 12 or not by using assert equal function.Please check the below script i have tried: def test_search(self): driver=self.driver driver.get("http://magento-demo.lexiconn.com/") driver.maximize_window() driver.find_element_by_xpath(".//*[@id='search']").send_keys("Bed & Bath") driver.find_element_by_xpath(".//*[@id='search_mini_form']/div[1]/button").click() lis = driver.find_element_by_xpath("//h2[@class='product-name'] / a") self.assertEqual(12,len(lis))

VIEW QUESTION

Cron Job Syntax – CPanel

I've never created, nor used a cron job before, but what I've gathered from numerous questions and answers on SO is that the process is fairly simple and involves something like the following: Create bash file with shell commands Edit…

VIEW QUESTION

Python JSONDecoderError – SEO

I am not to sure what I am doing wrong. I am trying to parse the specific contents within JavaScript. This is the output of "s" (for the code below it): <script type="text/javascript">window._sharedData = {"activity_counts":{"comment_likes":0,"comments":0,"likes":0,"relationships":0,"usertags":0},"config":{"csrf_token":"OIXAF5a6FwMQJj3vCaUQXCGUGL3sFb0Z","viewer":{"allow_contacts_sync":false,"biography":"Follow for the best social media…

VIEW QUESTION
Back To Top
Search