You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 29, 2020. It is now read-only.
class FirstWebDriverTest(unittest.TestCase):
def setUp(self):
#initialize Webdriver with Request Limit
self.driver = RespectfulWebdriver(webdriver=webdriver.Chrome())
self.driver.register_realm("Shopify", max_requests=2, timespan=1)
#setup Requests in same reals to figure out error code of the site without exceeding the limit
self.rr = RespectfulRequester()
self.rr.register_realm("Shopify", max_requests=2, timespan=1)
def test_check_statuses(self):
url = 'https://someshopify.myshopify.com/somepage'
r = self.rr.get(url, realms=["Shopify"], wait=True, allowRedirects=False)
print(r.status_code)
if(r.status_code == 200):
driver = self.driver
driver.get(url, realms=["Shopify"], wait=True)
def tearDown(self):
self.driver.close()
if __name__ == '__main__':
unittest.main()
When I do not use requests_respectful the RespectfulWebdriver is working nice, but if I want to force the same limit on both RespectfulWebdriver and RespectfulRequester then the RespectfulWebdriver doesn't even load the page. Browser opens, but it keeps waiting and waiting.
The text was updated successfully, but these errors were encountered:
Sample code:
When I do not use
requests_respectful
theRespectfulWebdriver
is working nice, but if I want to force the same limit on bothRespectfulWebdriver
andRespectfulRequester
then theRespectfulWebdriver
doesn't even load the page. Browser opens, but it keeps waiting and waiting.The text was updated successfully, but these errors were encountered: