Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
156 views
in selenium-and-webdriver by The go-to Tester (181 points)
retagged by
I was in an interview today. They asked me to name the command used for priting the value of a variable into the console.

1 Answer

0 like 0 dislike
by The go-to Tester (181 points)
selected by
 
Best answer

You can use echo command for the same as given below.

 

e.g. Variable var1 contains value "Hello world"

 

you may print it like

for linux / mac

$ echo $var1

in case of Windows

> echo %var1%

 

Hope it helps.


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

1.4k questions

1.6k answers

866 comments

1.9k users

...