-1

Is it like val function is predefined?

code:

selenium.open chrome url msn.com timeout 30000
list.create text aa result ♥list
selenium.callfunction search q by id functionname val parameters ♥list type jquery
selenium.runscript script ‴return $('#q').val();‴
dialog ♥result
Wiktoria Prusik
  • 840
  • 4
  • 15

1 Answers1

1

val() is a method in jQuery that lets you set or get the value of a given HTML element (Documentation here). #q is the ID of the search field over at msn.com, so what that script does is it retrieves the value typed out in that field. Since it's usually empty when the site is just loaded up, you would get an empty dialog box when calling dialog ♥result.

VIGNESH N
  • 208
  • 1
  • 7