Selen: Python webdriver va Firefox profillar

Men Python testini ishga tushiraman, lekin bu xatoni olaman

C:\selenium>E[Error 32] unable to access this file. This file is used by another process: 'c:\\docume~1\\ammini~1\\impost~1\\temp\\tmpfhvfvf\\cert8.db'

======================================================================
ERROR: test_w (__main__.W)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\selenium\w.py", line 15, in test_w
    driver.get("/")
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", l
ine 165, in get
    self.execute(Command.GET, {'url': url})
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", l
ine 153, in execute
    self.error_handler.check_response(response)
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py"
, line 116, in check_response
    zeroeth = value['stackTrace'][0]
IndexError: list index out of range

----------------------------------------------------------------------
Ran 1 test in 6.969s

FAILED (errors=1)

Bu erda Seleniy IDE dan olingan to'liq kod ....

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.common.exceptions import NoSuchElementException
import unittest, time, re

class W(unittest.TestCase):
    def setUp(self):
        self.driver = webdriver.Firefox()
        self.driver.implicitly_wait(1)
        self.base_url = "http://www.google.it/"
        self.verificationErrors = []

    def test_w(self):
        driver = self.driver
        driver.get("/")
        driver.find_element_by_id("lst-ib").click()
        driver.find_element_by_id("lst-ib").clear()
        driver.find_element_by_id("lst-ib").send_keys("pippo")
        driver.find_element_by_id("lst-ib").clear()
        driver.find_element_by_id("lst-ib").send_keys("outlet")
        driver.find_element_by_link_text("store").click()

    def is_element_present(self, how, what):
        try: self.driver.find_element(by=how, value=what)
        except NoSuchElementException, e: return False
        return True

    def tearDown(self):
        self.driver.quit()
        self.assertEqual([], self.verificationErrors)

if __name__ == "__main__":
    unittest.main()

Agar boshqa Firefox profilini yaratadigan bo'lsam, uni qanday ishlatishim mumkin? Boshqa Firefox profili kerakmi? Boshqa profil yaratdim va uni Python testining bitta katalogiga joylashtirdim (C: \ selenium), lekin u ishlamayapti ...

Ko'p rahmat.

Yaxshi tilaklar.

G:

3
Bunga sabab bo'lgan kodning parchasini yozasizmi? webdriver.Firefox() yangi FF profilini yaratishi kerak.
qo'shib qo'ydi muallif Corey Goldberg, manba
Mikko, selenyum loyihasi odatda yangilangan versiyalarni yangi FF versiyasini chiqaradi. odatda oldindan.
qo'shib qo'ydi muallif Corey Goldberg, manba
Firefox versiyalari bilan muammo bo'lishi mumkin. FF va Chrome tez tarqatish rejasi Selenyum va boshqa avtomatizatsiya vositalaridan foydalanish uchun juda qiyin kechdi.
qo'shib qo'ydi muallif Mikko Ohtamaa, manba
Men ushbu skriptni ishga tushirganimda xato xabari uchun boshqa katalogni olaman ...
qo'shib qo'ydi muallif Giuseppe Sorpippo, manba
birinchi marta Bu fayl boshqa operatsiya bilan ishlatiladi: 'c: \\ documente ~ 1 \\ ammini ~ 1 \ impost ~ 1 \\ temp \\ tmpfhvfvf \\ cert8.db & zwnj;' ... second Bu fayl boshqa jarayon tomonidan ishlatiladi: 'c: \\ documente ~ 1 \\ ammini ~ 1 \ impost ~ 1 \\ temp \\ tmpvcgo5 \\ cert8.db' & zwnj; .... va hokazo. ... Temp dir o'zgaradi
qo'shib qo'ydi muallif Giuseppe Sorpippo, manba

Javob yo'q

0
Python
Python
372 ishtirokchilar

Bu guruh python dasturlash tilini muhokama qilish uchun. Iltimos, o'zingizni hurmat qiling va faqat dasturlash bo'yicha yozing. Botlar mavzusini @botlarhaqida guruhida muhokama qling! FAQ: @PyFAQ Offtopic: @python_uz_offtopic

Python offtopic group !
Python offtopic group !
150 ishtirokchilar

@python_uz gruppasining offtop gruppasi. offtop bo'lsa ham reklama mumkin emas ) Boshqa dasturlash tiliga oid gruppalar @languages_programming