c# - Else if statement with Selenium doesen't work -
i have test website selenium in c#. on site, there buttons(10) in random order. program should check if button available or not.
below, created else-if statemeent, doesn't work. program doesn't click anything.
if (driver.findelement(by.name("btnk")).displayed) { driver.findelement(by.name("btnk")).click(); } else if (driver.findelement(by.name("btng")).displayed) { driver.findelement(by.name("btng")).click(); } can me this?
this if , else if possibility not true both statement if if , else 1 of them run .. here there chance run none of them
Comments
Post a Comment