关于#python#传传参的问题,如何解决?

def 封装后如何传如带引号的变量?

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
wps = webdriver.Chrome()
wps.get('https://baidu.com')
wps.maximize_window()

# 这样运行是没问题的

c = ("xpath", "//span[@class='soutu-hover-tip']")
wps.find_element(c).send_keys(Keys.CONTROL, 'V')


## 经过封装后就无法运行了
# 发送按键到当前元素ctrl+key
def senf_ctrl_key(self, args, key):
    self.find_ele(args).send_keys(Keys.CONTROL, key)

img


求解,如何才能有效封装

大哥,你的参数self没必要写,senf_ctrl_key(c , 'V')