java - Selenium WebDriver click on input element to upload file freezes -
I have to click on an element to upload a CSV file with Selenium WebDriver in JUNनेट The input looks like this:
& lt; Input type = "file" name = "upload 0" size = "56" value = "" id = "dateIIMport SHRITICCCV_upload 0" /> If I click on that input element then the OS window opens where I have to select my file to upload. My problem is that if I click on the input like this I am using selenium for:
driver.findElement (By.xpath ("// div [@ id = 'wwctrl_DateiImportSchritt2Csv_upload0'] / input")) .click (); It opens the OS window, but freezes the whole test without any exceptions. If I manually close the window, my test continues.
In another place in my code, I have to download a file. It is very similar, except that it is not an input element, but an anchor element ( & lt; a & gt; ) and it works fine. An OS window without my trial cold? Also try the submit () , but even the window does not open with that method. I'm using:
Windows 7
Firefox 32.0.3
Selenium Web Drivers 2.43.1
Genuine 4
Edited Do:
The entire daylight element looks like this: & lt; Div class = "group" id = "wwctrl_DateiImportSchritt2Csv_upload0" & gt; & Lt; = "DateiImportSchritt2Csv_upload0" for label id = "label_DateiImportSchritt2Csv_upload0" & gt; & Lt; Span & gt; CSV-Imported Fierce Rangelystein Aswan & lt; / Span & gt; & Lt; / Labels & gt; & Lt; P class = "labelInfo" id = "help_DateiImportSchritt2Csv_upload0" & gt; Bitte wählen Sie eine für din import best time date & Lt; / P & gt; & Lt; Input type = "file" name = "upload 0" size = "56" value = "" id = "DateIIMport SHRITITCCV_upload 0" /> & lt; / Div & gt; There is no submit button. The input is also not used for typing, you can click on it to open a single window.
text -
Use it to work for you auspicious part ...
Comments
Post a Comment