NisHera
11 years agoValued Contributor
Set text do not save
Im testing a web grid with time value
When I change values with "Set Text" it will not save with save button pressed.
(It work if save pressed manually -using a break point )
But if I use "Keys" function it will take values entered while saving.
the problem is Keys append if there exist previous value
there is no clear method to get rid of previous value.
alternatively I'm using Keys("[BS][BS][BS][BS]......") an ugly solution.
Please help..
Call Aliases.browser.pageWorkedhours.Aspnetform.tableMain.TimesheetItemG.Txtstart.Keys("9:00")
Call Aliases.browser.pageWorkedhours.Aspnetform.tableMain.submitSaveD.ClickButton
is working but not
Call Aliases.browser.pageWorkedhours.Aspnetform.tableMain.TimesheetItemG.Txtstart.SetText("9:00")
Call Aliases.browser.pageWorkedhours.Aspnetform.tableMain.submitSaveD.ClickButton
in latter case I can see 9:00 in text box but when saving it dissapears
When I change values with "Set Text" it will not save with save button pressed.
(It work if save pressed manually -using a break point )
But if I use "Keys" function it will take values entered while saving.
the problem is Keys append if there exist previous value
there is no clear method to get rid of previous value.
alternatively I'm using Keys("[BS][BS][BS][BS]......") an ugly solution.
Please help..
Call Aliases.browser.pageWorkedhours.Aspnetform.tableMain.TimesheetItemG.Txtstart.Keys("9:00")
Call Aliases.browser.pageWorkedhours.Aspnetform.tableMain.submitSaveD.ClickButton
is working but not
Call Aliases.browser.pageWorkedhours.Aspnetform.tableMain.TimesheetItemG.Txtstart.SetText("9:00")
Call Aliases.browser.pageWorkedhours.Aspnetform.tableMain.submitSaveD.ClickButton
in latter case I can see 9:00 in text box but when saving it dissapears
- Hi Nishnatha,
It looks like the results of the fields are saved when the onClick event is raised over the control. When using the SetText action, this event isn't fired.
So, the Keys methods would be a solution for you. You could use SetText to remove all the content (SetText("")) and Keys to set the new one.