Share
Go down
nukie
Posts : 3
Join date : 2009-09-18

Calling isTextPresent

on Fri Sep 18, 2009 2:38 pm
Hi!
I have problem calling isTextPresent.
It's simply not working for any test on my page. (all navigation actions, isElementPresent works). But all isTextPresent Fails =(.

Do you have any suggestions, why it could be?

Application is google maps + yahoo user interface based. Tested on IE8, FF3.0, FF3.5. Selenium RC 1.01.

Thanks for Your time!
avatar
Advisor
------------------------
------------------------
Posts : 383
Join date : 2009-07-30
Location : India
http://seleniumforum.forumotion.net

Re: Calling isTextPresent

on Fri Sep 18, 2009 4:02 pm
hi,

What type of parameter you are giving in is text present?

I think you are giving element xpath instead of actual text.

Example:

isElementPresent | //div[@id='hp']/table/tbody/tr[2]/td // this contain text "last modify". this will be working fine.

isTextPresent|//div[@id='hp']/table/tbody/tr[2]/td // this will find the text which you are giving in target as your xpath. It is fincing your xpath on browser as text.

To solve the problem use actual text instead of xpath in locator say
isTextPresent| "Last Modify"

Hope this will help u. best of luck.

bye
nukie
Posts : 3
Join date : 2009-09-18

Re: Calling isTextPresent

on Fri Sep 18, 2009 4:20 pm
Thanks, but i dont =(
I have defined actual text in it.

Could selenium have problems with it because of iframes or something?
avatar
Advisor
------------------------
------------------------
Posts : 383
Join date : 2009-07-30
Location : India
http://seleniumforum.forumotion.net

Re: Calling isTextPresent

on Fri Sep 18, 2009 4:33 pm
yes, there is problem in Iframe, you have to first select the frame then verify the text and after verifying get focus back to the original window or page.

Use following commands:

selenium.selectFrame(id Of frame)
verifyText present in iframe.
Selenium.selectWindow(null);

Hope this will solve your problem.
nukie
Posts : 3
Join date : 2009-09-18

Re: Calling isTextPresent

on Fri Sep 18, 2009 5:06 pm
Yeah!
That was it !
One more success story ! )
Thanks a lot!!
kirankk
Posts : 1
Join date : 2010-03-20

new mail

on Sat Mar 20, 2010 11:36 pm
how to write mail in gmail with selenium test.,
Sponsored content

Re: Calling isTextPresent

Back to top
Permissions in this forum:
You cannot reply to topics in this forum