i tried all the possible ways provided by selenium to find element but i am not successful. below is the code that i am using
System.setProperty("webdriver.chrome.driver","C:\\chromedriver_win32\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.manage().window().maximize();
driver.get("https://192.168.0.101");
/*below two lines tried but not successful*/
WebDriverWait wait = new WebDriverWait (driver, 15);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("#login_username"))).sendKeys("Aa12");
//driver.findElement(By.xpath("//*[@id='login_username']")).sendKeys("Aa12");
//driver.findElement(By.xpath("//input[@id='login_username']")).sendKeys("Aa12");
//driver.findElement(By.name("username")).sendKeys("Aa12");
//driver.findElement(By.id("login_username")).sendkeys("Aa12");
//driver.findElement(By.xpath("//input[contains(@value,'Login')]")).click();
my html code for username element is as follows
<input class="input" type="text" name="username" maxlength="16" id="login_username">
i am getting error as
Starting ChromeDriver 74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}) on port 39970
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
Caused by: org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"#login_username"}
other thing i like to mention that i have enabled protected mode for all internet, local intranet, trusted sites, restricted sites in security settings browser.
After Web scraping of site console showing below error
Failed to load resource: the server responded with a status of 404 (Site or Page Not Found)
i am sure it is not problem of selenium may the web UI need some different way to access page info. please help