我试图使用ActionChains中的move_to_element触发鼠标悬停事件,无法使其正常工作.任何帮助表示赞赏.谢谢.
我的代码:
class TestSystemPromotion(unittest2.TestCase):
@classmethod
def setUpClass(self):
...
self.setup_test_data()
..
def test_something(self):
...
def setup_test_data(self):
...
if __name__ == '__main__':
unittest2.main()
Run Code Online (Sandbox Code Playgroud)
我得到的错误是:
TypeError: unbound method setup_test_data() must be called with TestSystemPromotion
instance as first argument (got nothing instead)
Run Code Online (Sandbox Code Playgroud)