我想获取value =“”中的值448CA236139FF2A5D7C40CE327779F49并将其放在变量中以在其他类中使用
MariaDB [(none)]> ALTER USER 'root'@'localhost' IDENTIFIED WITH
mysql_native_password BY 'mypassword';
MariaDB [(none)]> ALTER USER 'root'@'localhost' IDENTIFIED VIA
mysql_native_password BY 'mypassword';
MariaDB [(none)]> ALTER USER root@localhost IDENTIFIED VIA
mysql_native_password;
SET PASSWORD = PASSWORD('mypassword');
MariaDB [(none)]> ALTER USER root@localhost IDENTIFIED WITH
mysql_native_password;
SET PASSWORD = PASSWORD('mypassword');
MariaDB [(none)]> ALTER USER 'root'@'localhost' IDENTIFIED WITH
mysql_native_password;
SET PASSWORD = PASSWORD('mypassword');
我尝试过
<input type="hidden" name="Idsession" value="448CA236139FF2A5D7C40CE327779F49" xpath="1" style="">
没用
答案 0 :(得分:1)
尝试String cookie = driver.findElement(By.name("Idsession")).getAttribute("value");
。
您正在尝试检索属性“值”,在这种情况下“ innerText”没有任何意义。