Jump to content

FF.au3 not able to set value for table cell

Recommended Posts

I am using FF.au3, Since its proprietary I can't share image or link for the data I am using.

But here is my problem abstract code .

; Test if I get table contents correctly

;$sCurr= _FFXPath("/html/body/form[1]/div[2]/div[3]/div[2]/table[@id='bodyTable']/tbody/tr[3]/td[4]", "textContent")
;MsgBox(0, "Current Value ", $sCurr, 2) ; output " -254.4"

$sObj = _FFXPath("/html/body/form[1]/div[2]/div[3]/div[2]/table[@id='bodyTable']/tbody/tr[3]/td[4]")
MsgBox(0, "Object", $sObj, 2) ; output "OBJECT|FFau3.xpath"

$sRet = _FFObj($sObj, "value", "-253.4")
MsgBox(0, "Return Value", $sRet); output " -253.4"

$s = _FFXPath("/html/body/form[1]/div[2]/div[3]/div[2]/table[@id='bodyTable']/tbody/tr[3]/td[4]", "textContent")
MsgBox(0, "New Value", $s); output " -254.4"

My expectation is that that last MsgBox shows new value that I had set that is "-253.4"

I would highly appreciate any support on this


It doesn't get easier, you just get better...

Link to comment
Share on other sites

A TD element doesn't have a value attribute, so your call to _FFObj is likely failing (you need to check @error to confirm).

You could try changing 'value' to 'textContent' or you could try modifying the table contents directly with _FFCmd --

$sObj = _FFXPath("/html/body/form[1]/div[2]/div[3]/div[2]/table[@id='bodyTable']/tbody/tr[3]/td[4]")


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...