I am using Selenium RC with chrome mode for Firefox to automate test cases for a web application. I write scripts in Java using TestNG and Eclipse. Now to the main thing:
I'm having problems with Selenium RC for recognizing certain XPath. I am checking my XPaths with the XPath-Checker extension for Firefox, which shows no errors. Then I test it in the Selenium IDE to make sure XPath is recognized. Even the IDE recognizes the element. But his Selenium RC just does not recognize. Is there anything I can do to fix this?
In particular, I am trying to click on a specific area given by:
html/body/form/div[@id='someid1']/div[@class='someClass']/div[@id='someid2']/div[@id='someid3']/div[@id='someid4']/div[@title='titleOfTheElement']
Then I also tried:
//div[@title='titleOfTheElement']
xpath=//div[@title='Automated User']
xpath=/descendant::div[@title='Automated User']
Nothing yet!
1) Can anyone suggest what might be wrong, or is Selena known to have XPath problems?
2) ( XPath checker), , Selenium RC? , , RC XPaths.
,
Mugen
:
selenium.click("somelink");
selenium.waitForPageToLoad("30000");
boolean flag=false
do{
if (selenium.isTextPresent("Some text on the page which loads last"))
{
flag=true
}
}while(flag=false);
selenium.click("locator for area which is driving me crazy");
, , ( ), .
HTML :
<div id="someid1" style="overflow: hidden;">
<div id="someid2" title="title1" class="someclass">title1</div>
<div id="someid3" title="title2" class="someclass">title2</div>
<div id="someid4" title="required title" class="someclass">required title</div>
<div id="someid5" title="title3" class="someclass">title3</div>
<div id="someid6" title="title4" class="someclass">title4</div>
<div id="someid7" title="title5" class="someclass">title5</div></div>
, .: -)