dimanche 27 août 2017

I need about if c# if there is a xpath or not

im using selenium web driver with firefox driver. i have to look this xpath if in the page or not so i can forward next step but i dont know how to do it.

//*[@id='view_container']/form/div[2]/div/div/div/ul/li[1]/div/div[2]



if (idk what i have to write here) driver.FindElement(By.XPath("//[@id='view_container']/form/div[2]/div/div/div/ul/li[1]/div/div[2]"));

{

if we found xpath

}

else
{

if dont find xpath

}

sorry my bad english. thank you.

Aucun commentaire:

Enregistrer un commentaire