java - Is there any option to give multiple properties of any element in Selenium Webdriver? -
i have selenium webdriver script written in java language need run in multiple sites. script written 1 site other sites follow the same architecture , element properties in sites same. script work fine in sites.
problem that, element properties might different in site. there option in selenium webdriver can pass multiple properties element.
something like
string elemprop = "prop1|prop2|prop3" // properties separated pipe driver.findelement(by.id(elemprop)).click();
so when execute, selenium webdriver should first check prop1 prop2 , prop3.
i have seen feature in rational functional tester. wanted know if selenium webdriver gives feature ?
thanks.
if mean check multiple properties , 1 of these properties suitable current specific website's element, may try this(in java):
string xpath = "//*[@id='id1' or @id='id2' or @id='id3']"; driver.findelement(by.xpath(xpath));
Comments
Post a Comment