eclipse - Selenium- WebButton need to be clicked only once in a loop -


i writing selenium script in eclipse adding user application fetching user values excel sheet.

in scenarion button "add" exist @ first user addition, once clicked textbox "add_name" appear name need added. in loop second user addition selenium "add" webelement, does'nt exists throwing error.

i have used below code elements existance i'm getting below error. please me in this.

code used : //click on "add new button"

            if(browser.findelements(by.id("ext-gen72")).size()!=0){                 browser.findelement(by.id("ext-gen72")).click();             } 

else{ continue rest of steps.... }

error:exception in thread "main" org.openqa.selenium.elementnotvisibleexception: cannot click on element (warning: server did not provide stacktrace information)


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -