aakash22
10 years agoOccasional Contributor
How to pass variable to eval(JavaScript) function
i have been trying to pass date value to my uneditable date filed. so i have retrieved the javascript ID(startDateCalendar_dateTextBox) for the field and i am trying to pass multiple values to the s...
- 10 years ago
Is there a specific reason you're using eval? Can't you access the object directly like this?
var obj = page.FindChildByXPath("//*[@id='startDateCalendar_dateTextBox']");
// Or narrow down the search by specifying the HTML tag, for example: // var obj = page.FindChildByXPath("//input[@id='startDateCalendar_dateTextBox']");
obj.value = ...;