MaxRetryError: HTTPConnectionPool: Max retries exceeded (Caused by ProtocolError('Connection aborted.', error(111, 'Connection refused')))

General Tech Bugs & Fixes 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I have one question:I want to test "select" and "input".can I write it like the code below: original code:

     12 class Sinaselecttest(unittest.TestCase):
     13 
     14     def setUp(self):
     15         binary = FirefoxBinary('/usr/local/firefox/firefox')
     16         self.driver = webdriver.Firefox(firefox_binary=binary)
     17 
     18     def test_select_in_sina(self):
     19         driver = self.driver
     20         driver.get("https://www.sina.com.cn/")
     21         try:
     22             WebDriverWait(driver,30).until(
     23                 ec.visibility_of_element_located((By.XPATH,"/html/body/div[9]/div/div[1]/form/div[3]/input"))
     24             )
     25         finally:
     26             driver.quit()
     # #测试select功能
     27         select=Select(driver.find_element_by_xpath("//*[@id='slt_01']")).select_by_value("微博")
     28         element=driver.find_element_by_xpath("/html/body/div[9]/div/div[1]/form/div[3]/input")
     29         element.send_keys("杨幂")
     30         driver.find_element_by_xpath("/html/body/div[9]/div/div[1]/form/input").click()
     31         driver.implicitly_wait(5)
     32 
     33         
     34    

I want to test Selenium "select" function.so I choose sina website to select one option and input text in textarea.then search it .but when I run this test,it has error:

 Traceback (most recent call last):
      File "test_sina_select.py", line 32, in tearDown
        self.driver.close()
      File "/usr/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 688, in close
        self.execute(Command.CLOSE)
      File "/usr/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 319, in execute
        response = self.command_executor.execute(driver_command, params)
      File "/usr/lib/python2.7/site-packages/selenium/webdriver/remote/remote_connection.py", line 376, in execute
        return self._request(command_info[0], url, body=data)
      File "/usr/lib/python2.7/site-packages/selenium/webdriver/remote/remote_connection.py", line 399, in _request
        resp = self._conn
                                                
                                                
0 views
0 shares
profilepic.png
manpreet 2 years ago

Just had the same problem. The solution was to change the owner of the folder with a script recursively. In my case the folder had root:root owner:group and I needed to change it to ubuntu:ubuntu.

Solution: sudo chown -R ubuntu:ubuntu /path-to-your-folder


0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

tuteehub community

Join Our Community Today

Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.

tuteehub community