java - Popup Manipulation -


i'm new selenium , i'm trying upload document inside popup when "upload document" has clicked.

i've run application in selenium ide , export test case junit 4/ webdriver. , imported eclipse , running same works well.

when bit altered code , tried run same uploading concept says

"nosuchelementexception" unable locate element{"method":"id","selector":"file_upload"}. 

below i've attached corresponding html , popup box.

enter image description here

selenium code used listed below:

    driver.findelement(by.cssselector("div.tab_submit.register_irb_complete_button")).click();     driver.findelement(by.id("file_upload")).clear();     driver.findelement(by.id("file_upload")).sendkeys("c:\\users\\xxx\\downloads\\loremipsum.docx");     driver.findelement(by.cssselector("span.close")).click();     driver.findelement(by.cssselector("#irb_documents > #irb_next")).click(); 

from can see, id field of input tag "file_upload_0", not "file_upload". or misunderstanding question?


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -