javascript - How to uncheck rule in jcf-hidden add-on with selenium? -


i'm doing automation website using jcf-hidden class (some kind of jquery class or something), , add-on setting ability select element (the element want get) hidden/block.

but if uncheck display: block !important; works...

to test it, added wait element , uncheck , saw find element.

how can uncheck code?

this checkbox want uncheck code:

enter image description here

i'm using scala way.

so process want is:

  1. driver.get("https://go url need dropdown at")

  2. find element

    val selectcompany = new select(driver.findelement(by.xpath("""//*[@id="main"]/div[3]/div/div/table/tbody/tr/td/select[@id="company_id"]""")))

3.

//your solution here uncheck display: block  

4.

select value element

  selectcompany.selectbyvalue("100") 

you can run javascript change attribute:

javascriptexecutor js = (javascriptexecutor)driver; js.executescript("document.getelementbyid('company_id').setattribute('style','display: block !important;')"); 

Comments

Popular posts from this blog

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

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -