Hi,
I'm trying to click on the panel links (links in the same page but different panel) in the page using Selenium RC. I'm able to do it by using:
browser.waitForCondition("selenium.isElementPresent(\"id=placeOrderLink\")", "30000")
but I want to make it generic and I tried to use:
String var="placeOrderLink";
browser.waitForCondition("\"selenium.isElementPresent(\\"id="+var+"\\")\"", "30000");
and it doesnt work! I get an error. I'm using Java to code my test suite.
-
Try this browser.waitForCondition("selenium.isElementPresent(\"id=" + var + "\")", "30000")
-
BTW: you don't need "
id=controlID" when specifying control ID's in locators - control ID locator is the default one, so "controlID" is enough. -
thanx bhushan, it worked!! thanx a lot and igor, thnx for u too buddy, i shall keep that in mind!!
0 comments:
Post a Comment