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:
i'm using scala way.
so process want is:
driver.get("https://go url need dropdown at")
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
Post a Comment