# Ruby (EVAL) - Selenium

**URL:** <https://metaruby.com/t/ruby-eval-selenium/1916>\
**Category:** Ruby Questions\
**Tags:** ruby\
**Created:** [September 12, 2018, 3:34pm UTC](https://metaruby.com/t/ruby-eval-selenium/1916 "2018-09-12T15:34:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![satish9126](https://metaruby.com/letter_avatar_proxy/v4/letter/s/f9ae1b/32.png) [@satish9126](https://metaruby.com/u/satish9126)\
**Post date:** [September 12, 2018, 3:34pm UTC](https://metaruby.com/t/ruby-eval-selenium/1916/1 "2018-09-12T15:34:28Z")

</div>

Hi Iam using page object model in my Selenium -Ruby Automation Framework and trying to use eval so that i can parameterize some value in the code and run them.

```
 on("abcpage").certify # code to click on button named certify using POM framework

```

so I want to parameterize the page value and button name with below code so tried eval but its now working.

not working :

```
 pagename = "abcPage"
 buttoname = "testbutton"
 eval(on(pagename).buttonname)

```

I tried only parameterizing the page name and give button name thats work but on giving both pagename and buttonname parameterized its not working.

```
eval(on(pagename).testbutton) 

```

Appreciate your help and suggestions to fix this issue.

Thanks.
