Hi,

I "right" means "visually on the right in the browser", this is not possible as 
it depends on CSS, width of your screen, size of the zoom, ...

But if you means text is after image in the HTML source code, then it is 
feasible with XPath and using assertElementPresentByXPath.

Try something like:

//i...@src="/images/aaa.gif"]/following-sibling::font[text()="text text 
text."]

Note that it works because you text is itself in a <font> element. If you text 
was alone, you may need a very different expression.

Regards,

Julien




________________________________
De : "Singh-2, Rajinder" <[email protected]>
À : [email protected]
Envoyé le : Mercredi, 26 Août 2009, 11h54mn 34s
Objet : [JWebUnit-development] JwebUnit Help needed


Hi,
 
I 
want to check if the text exists to right of particular image or not how can I 
check this in JWebUnit?
 
Html code is something like this
<imgsrc="/images/aaa.gif"width=10height=10><fontcolor="green">text text 
text.</font>
 
How can I 
check that text is on right of aaa.gif 
image
 
Regards
Rajinder


      
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
JWebUnit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

Reply via email to