我無法在我的第二個類中調用我的原始硒實例,它有一個函數GetRows()。有什麼方法可以在我的函數類中獲得硒對象?如何將Selenium對象傳遞給另一個類?
Class test(unittest.TestCase):
def setUp(self):
self.verificationerrors=[]
self.selenium = selenium("localhost",4444,"","http://localhost")
self.selenium.start()
def test_untitiled(self):
pass
def teardown(self):
pass
def Get(self):
return self.selenium
Class Functions:
def GetRows(self)
selenium.get_xpath_count(path) //Cant call selenium object here! :(
sel = test().get() // Does not allow me to return self. selenium :(
作爲硒核心提交者我不能建議任何人使用SQA StackExchange。 -1 – AutomatedTester 2011-05-21 18:15:38
作爲Selenium Doc的核心成員,我想我沒有做錯任何事情。你見過這個嗎? - http://meta.sqa.stackexchange.com/questions/13/how-would-we-attract-selenium-users-to-ask-question-on-sqa-site-than-on-stackovef最重要的是這可能是將回答標記爲-1的原因嗎? – Tarun 2011-05-22 10:22:54