# Syntax error with Evaluate JavaScript

**URL:** <https://forum.robotframework.org/t/syntax-error-with-evaluate-javascript/7106>\
**Category:** SeleniumLibrary\
**Created:** [2 April 2024 12:12 UTC](https://forum.robotframework.org/t/syntax-error-with-evaluate-javascript/7106 "2024-04-02T12:12:30Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![PavelK](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@PavelK](https://forum.robotframework.org/u/PavelK)\
**Post date:** [4 April 2024 07:59 UTC](https://forum.robotframework.org/t/syntax-error-with-evaluate-javascript/7106/5 "2024-04-04T07:59:04Z")

</div>

> [@rasjani](#):
>
> Evaluate keyword runs _python code_ - there is no way to use that for evaluating javascript.

This is interesting. According of this user guide paragraph, Evaluate can be used with JavaScript? I even found some other examples of Evaluate JavaScript in this forum.  
[https://marketsquare.github.io/robotframework-browser/Browser.html#Evaluate%20JavaScript](https://marketsquare.github.io/robotframework-browser/Browser.html#Evaluate%20JavaScript)

And here is a forum post, suggesting Evaluate JavaScript, to get text from an element…

> [@Getting Text from Parent element while Text in Child exists](https://forum.robotframework.org/t/getting-text-from-parent-element-while-text-in-child-exists/3673/2):
>
> I’ve only just started trying out browser library if I was to be honest from moving from seleniumlibrary, but from what I understand there’s no way of getting the text without that second span text value in this instance with Get Text and it’s acting as it should (could be wrong), it was pretty fun to play around with the Get Text and Get Property. But what you could do in the mean time is: ${el} Get Element "insert\_your\_selector" ${value} Evaluate JavaScript …

---

_[View the full topic](https://forum.robotframework.org/t/syntax-error-with-evaluate-javascript/7106)._
