Hello,
There is no direct IsHTMLEnable function. There are different ways to create one depending on the web page design.
Here is an example for an element which can be right clicked:
- Code: Select all
Function IsEnable(descriptor$)
local buffer1, buffer2, ret
ret=ExistHtmlElement(descriptor$)
if ret=1 then
'Save the values of those system variables before assigning them
buffer1=#IgnoreErrors
buffer2=#ActionTimeout
#ActionTimeout=10
#IgnoreErrors=1
ret=ClickHTMLElement(descriptor$,Right)
usewindow(top$())
sendkeys("<Esc>", NoActivate)
if ret=0 then
ret=1
else
ret=0
endif
else
ret=0
endif
'Restore the original values
#IgnoreErrors=buffer1
#ActionTimeout=buffer2
IsEnable=ret
EndFunction
startbrowser("ie","www.wintask.com/demos/form.htm")
UsePage("Form")
res=IsEnable("INPUT RESET[VALUE= 'Submit']")
pause 1
msgbox(res)
ret=IsEnable("INPUT CHECKBOX[NAME= 'contactsoon']")
pause 1
msgbox(res)
If it's not suitable for your web page, thanks to send the url where you want to test the hidden or not element to
info@wintask.com and on the real page, we will tell the best way to do it.
Regards.
WinTask Tech Support