Answer the question
In order to leave comments, you need to log in
RAM is melting before our eyes, I don’t understand what’s the matter?
After launching the application (and through PyCharm or cmd), after literally 10 minutes, the RAM is completely clogged, the virtual and then the physical memory starts to fill up, I can’t understand where the breakdown is and what’s actually the matter ..
from selenium import webdriver
import unittest
class UntitledTestCase(unittest.TestCase):
def setUp(self):
self.driver = webdriver.Firefox('D:\profile')
self.driver.implicitly_wait(3)
def test_untitled_test_case(self):
driver = self.driver
driver.get("http://site.ru")
while True:
nums = int(1)
while nums != 16:
driver.find_element_by_xpath(u"{}{}{}{}".format("(//img[@alt='Комментарии'])","[",str(nums),"]")).click()
nums += 1
try:
driver.find_element_by_xpath(u"//img[@alt='Спасибо']").click()
driver.back()
except:
driver.back()
driver.find_element_by_link_text(u"След.").click()
if __name__ == "__main__":
unittest.main()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question