How to check that a value is set on a dropdown box selenium java -
i have html code. thing option names contain lots of spaces until tags closed. <select name="auth" id="auth" size=1 onchange="updatepagestate()"> <option value="0">open system </option> <option value="1">wep </option> <option value="2">wpa </option> <option value="3">wpa2 </option> i want check option selected in dropdown box using selenium in java. code: try { webdriverwait wait = new webdriverwait(driver, 20); wait.until(expectedconditions.texttobepresentinelementvalue(((by.xpath("//select [@id='auth']/option['" + authen + "']"))), authen)); system.out.println("authentification correct"); } catch (exception x) { system.out.println("authentification incorrect"); x.printstacktrace(); } where "authen" variable read file corresponds options in dropdown box. i followin...