Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
sunny
Posts : 1
Join date : 2010-02-12

How to Pass parameter in selinium  command in (perl ) Empty How to Pass parameter in selinium command in (perl )

Fri Feb 12, 2010 8:50 am
Hi All,

I need help in parametering the Link text in selinium.

In my webpage to verify the link for the text i use the selinium command as below

$sel->text_is("link=Logout", "Logout");

I wanted to pass the variable to the $sel->text_is($var).

When i tried below program , its not working.


my @val = ('"link=Logout", "Logout"' ,'"link=Advanced Search", "Advanced Search"');
print "The First Value is $val[0] \n";
$sel->text_is($val[0]);


The print statement prints the correct format , but the sel command execution fails.


I am getting the error.

Error requesting http://localhost:4444/selenium-server/driver/?cmd=getText&1=%22
link%3DLogout%22%2C%20%22Logout%22&sessionId=17a498aa96a9475997f79cc83ae16a3d:
ERROR: Element "link=Logout", "Logout" not found


Can anyone please help to resolve this issue?


I tried below options, but no luck .
$sel->text_is("$val[0]");
$sel->text_is('$val[0]');


Can anyone please let me know what is correct way to pass parameters.


Thanks
Sunitha
Advisor
Advisor
------------------------
------------------------
Posts : 387
Join date : 2009-07-30
Location : India
https://seleniumforum.forumotion.net

How to Pass parameter in selinium  command in (perl ) Empty Re: How to Pass parameter in selinium command in (perl )

Wed Feb 17, 2010 12:45 pm
Hi,

I have one code which is written in java. You have to just change syntax into perl and understand the logic . It's simple and I am sure you will get it.

checkout this thread
https://seleniumforum.forumotion.net/selenium-rc-discussion-f4/parameterise-you-login-page-using-java-t42.htm

Best of luck

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