javascript - How to get to a select element when its hidden? -


usually when want use select element pretty simple, go:

val selectcompany = new select(driver.findelement(by.cssselector("#company_id"))) selectcompany.selectbyvalue("975") 

but in case dosen't work...

this html (the relevant part):

enter image description here

but error using css selector, error:

exception in thread "main" org.openqa.selenium.elementnotvisibleexception: element not visible , may not interacted command duration or timeout: 60 milliseconds

i tried add wait element still not working...

i guess issue select element hidden, can please helpppp

thanks

execute script before try find element; this. hope help

((javascriptexecutor) driver).executescript(" document.getelementbyid('company_id').style.visibility = 'visible'; "); 

Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

android - How to create dynamically Fragment pager adapter -