Re: [Dev] Sending keys to invisible UI element in Selenium

2016-06-21 Thread Megala Uthayakumar
Hi, After setting the display of the file element to block it worked. ((JavascriptExecutor) webDriver).executeScript("document.getElementById(' selected-file').style.display=*'block''';*"); Thanks Rasika for offline suggestions. Thanks. Regards, Megala On Wed, Jun 22, 2016 at 11:04 AM,

Re: [Dev] Sending keys to invisible UI element in Selenium

2016-06-21 Thread Megala Uthayakumar
Hi Rasika, Thanks for suggestion. I already tried those. But still I am getting the same error. I doubt it is because of the file-upload-control class in the the parent div. Thanks. Regards, Megala On Wed, Jun 22, 2016 at 10:48 AM, Rasika Perera wrote: > Hi Megala, > > As

Re: [Dev] Sending keys to invisible UI element in Selenium

2016-06-21 Thread Rasika Perera
Hi Megala, As [1] says, sending keys to a hidden element is a special use case. Selenium throws this exception because such that in real scenario user isn't entering text into hidden inputs as such. Hence "file input" should be treated as a special case. You may also need to enable a File

[Dev] Sending keys to invisible UI element in Selenium

2016-06-21 Thread Megala Uthayakumar
Hi All, I am trying to write a UI test case in selenium which requires to send the keys to invisible file element in UI. In a normal scenario, user selects the file using a file browser and when the user selects a file, the selected file will be automatically passed to that file UI element.