pycharm you want to automatically get into the parameter attributes of intelligence suggesting you, tips, parameter type declaration

Such as the browser driven Chrome_driver, declared that he was WebDriver class, to use WebDriver class, the need to import the package to which it belongs
from selenium.webdriver.remote.webdriver import WebDriver
from selenium.webdriver.remote.webelement import WebElement
 
def __init__(self,Chrome_driver:WebDriver):
self.driver =Chrome_driver
 
def input(self,ele:WebElement,value):
ele.clear()
ele.send_keys(value)
 

Guess you like

Origin www.cnblogs.com/momoon/p/12230481.html