I am using Selenium to test a website. I can upload a ".txt" file and then double click on it to open,But I am not able to close the opened file using selenium!!!
I know there is a solution with robot tool by using Alt+F4 but I am not allowed to use robot, I tried the selenium code below to close the window, it does not work:
action.sendKeys(Keys.chord(Keys.ALT,Keys.F4)).build().perform();