It's because jquery is running in the controller window not the client
window.. (note that jquery remembers which window it was started in
and it has ability to navigate any dom you pass to it which is what
jquery= selector in fact does)..
You can try something like the following just remember here that
${code} can't contain single quotes in this example..
Execute Javascript From App
[Arguments] ${code}
[Documentation] Runs the given javascript from inside the
application window instead of from the selenium controller window like
the original Execute Javascript does.
Execute Javascript window.eval('${code}')
> --
> You received this message because you are subscribed to the Google Groups "robotframework-users" group.
> To post to this group, send email to robotframe...@googlegroups.com.
> To unsubscribe from this group, send email to robotframework-u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/robotframework-users?hl=en.
>
This approach only works if you are testing a Swing application. Even
then the APIs provided by java.awt.robot are pretty low level and you
would be better off using higher level tools build on top of it.
> Also I clarified, that it is possible to use java classes and
> methods with robot framework. But as I understood the only way to use
> java code is to import java library and create own defined keywords.
> Maybe it is some more simple ways for using java code in robot
> framework?
The main requirement is that you need to run Robot on Jython or use
the remote library interface. The library itself can be written using
Java or Jython.
Cheers,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org