我正在使用一个名为callow的蛮力脚本,我试图在一个免费的沙箱上测试它(因为我正在学习道德黑客),当我运行该脚本时,我会得到以下错误:
Traceback (most recent call last): File "C:\Users\Joe\callow\callow.py", line 163, in <module> wizard() File "C:\Users\Joe\callow\callow.py", line 93, in wizard brutes(username, username_selector, password_selector, submit_selector, pass_list, website) File "C:\Users\Joe\callow\callow.py", line 119, in brutes Sel_user = browser.find_element_by_css_selector(username_selector) # Finds Selector AttributeError: 'WebDriver' object has no attribute 'find_element_by_css_selector'
下面是我的代码的一部分,错误似乎是从这里产生的。
try: Sel_user = browser.find.element_by_css_selector(username_selector) # Finds Selector except selenium.common.exceptions.NoSuchElementException: print((color.RED + '\n[!]'+ color.CWHITE + ' Username feild selector is invalid.')) sys.stdout.flush() exit() Sel_pas = browser.find_element_by_css_selector(password_selector) # Finds Selector except selenium.common.exceptions.NoSuchElementException: print((color.RED + '\n[!]'+ color.CWHITE + ' Password feild selector is invalid.')) sys.stdout.flush() exit()