Quality Testing

Quality is delighting customers

Hi,
Please can anyone tells me about this error in selenium IDE......
[error] Element css=a.gbzt.gbzt-hvr > span.gbts not found
[error] Element//div[@id='ctl00_Panel6']/table/tbody/tr/td/div/table/tbody/tr/td/table/tbody/tr/td/ul/li[2]/font/
a not found
please give quick response

Views: 143

Reply to This

Replies to This Discussion

Regarding the secnd error, it could be that the XPath given for the object is wrong. You can use the XPath Checker addon for verifying the xpath of the object.

Thanks 4 ur rply....

I am trying Xpath checker too..........but still i m getting different type of errors......

can u plz refer any doc or link which can help me to find out these small type of errors.........?

The two elements you are trying to find are not on the current page.  For the first item the css looks like it is malformed - includes a '>'.  In the second error it looks like you are using xpath but you also seem to have the id.  I would suggest just using the id.

I'll go one step further.  Using a very long xpath like the example above is really a bad idea.  You are tightly coupling the tests to the exact layout of the web page.  When the page changes your tests will break.  I would suggest working with the developer to ensure that you have ids on all of the elements and use those to find the elements.  When the page is restructured the id will remain the same and your test will not break.

 

Further I would suggest building an abstraction layer to contain all of the knowledge on how to access the page and access that layer through higher-level methods.  In this way you tests will be less brittle.  If you are interested in reading a little about this you can see http://www.cheezyworld.com/2010/11/09/ui-tests-not-brittle/

Thnx 4 ur rply.............

I am newbie in automation testing........so i think ur link will be helpful 4 me to learn abt selenium..........

The link really doesn't use Selenium - it uses Watir with Cucumber.  I would suggest reading it to understand the concepts of the best way to structure your code.

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2022   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service