elementToBeClickable
driver.find_element_by_xpath("//*[.='я не робот']").click()
def something:
driver = webdriver.Chrome()
driver.get('https://yandex.ru')
driver.execute_script(
"var btn = document.getElementById('wd-_teaser');"
"var checkbox = document.createElement('input');"
"var label = document.createElement('label');"
"label.appendChild(document.createTextNode('GOOD'));"
"checkbox.type = 'checkbox';"
"checkbox.id = 'randomID';"
"btn.appendChild(checkbox);"
"btn.appendChild(label);")
element = driver.find_element_by_id("randomID")
while not element.is_selected():
time.sleep(2)
git config --global user.name "Name"
git config --global user.email "email"
driver.switch_to.frame(webelement)
driver.switchTo.frame(0)
browser.maximize_window()
--window-size=1200,600
browser.execute_script(s"return (function(webelement, text) {" +
"if (webelement.getAttribute('readonly') != undefined) return 'Cannot change value of readonly element';" +
"if (webelement.getAttribute('disabled') != undefined) return 'Cannot change value of disabled element';" +
"webelement.focus();" +
"var maxlength = webelement.getAttribute('maxlength') == null ? -1 : parseInt(webelement.getAttribute('maxlength'));" +
"webelement.value = " +
"maxlength == -1 ? text " +
": text.length <= maxlength ? text " +
": text.substring(0, maxlength);" +
"return null;" +
"})(arguments[0], arguments[1]);", element, text)
class Test{
public static void main(String[] args) throws FileNotFoundException {
OutputStream output = new FileOutputStream("E:\\java_file\\Files_io\\fileTest.txt");
PrintStream printOut = new PrintStream(output);
System.setOut(printOut);
}
}