I'm currently working on automating the input of a betting amount on a bookmaker's betslip. Here is the code I'm using:
<input id="slip_sgl_stake95274901L" type ="text"
onblur="document.betslip.single_stake_onblur(this,'95274901L') onkeyup =
"document.betslip.single_stake_onkeyup(this,'95274901L')" size ="7" maxlength="15" value="">
I've been experimenting with C# and .Net, but so far haven't had much success, despite trying various approaches. Specifically, I've tried:
wb.Document.All["slip_sgl_stake95274901"L].SetAttribute("value", betAmount + "");
object[] parameters = { wb, spanID.ToString() + "L"};
wb.Document.InvokeScript("document.betslip.single_stake_onkeyup", parameters);
wb.Document.InvokeScript("document.betslip.single_stake_onblur", parameters);
Where 'wb' represents the web browser instance.
Although the amount gets entered, it appears that these functions are not functioning as expected. Can anyone offer insight into what might be going wrong?