如何查看$('select[name=style_website]').on('change', function (e) {
var optionSelected = $("option:selected", this);
var valueSelected = this.value;
$('.websitestyle_js').val(valueSelected);
});
&中是否存在文字? selenium webdriver
?
我试过了:
python
回复是:
def get_email(browser):
email_check = driver.find_element(By.CLASS_NAME("viewed-user-email")).text
assert user_name in email_check, "Text not found %s" % user_name
答案 0 :(得分:0)
如果您正在寻找如何检查字符串是否是另一个字符串的子字符串,可以回答:
assert my_email_address in email_check, "Text not found %s" % my_email_address
in
contains
关键字
完整代码:
def get_email(browser):
email_check = browser.findElement(By.CLASS_NAME("viewed-user-email")).text
assert my_email_address in email_check, "Text not found %s" % my_email_address
参考文献: