Jump to content

Unable to select checkbox


Recommended Posts

This is a form. I have broken it down to Element. I'm trying to click on checkbox for that element. Unforuntately it's not working. Just errors out saying object not found. :)

$Frametype = _IEFrameGetObjByName($oIE,"main")

$Formname = _IEFormGetObjByName($Frametype,"Form1")

$FieldType = _IEFormElementGetObjByName($Formname,"FileRequestForm:SitesSitegroups:HFileRequestForm:SitesSitegroups")

_IEFormElementCheckBoxSelect($FieldType,"SG")

<DIV id=FileRequestForm_SitesSitegroups style="DISPLAY: block" name="TreeViewDiv">
<INPUT id=FileRequestForm_SitesSitegroups_HFileRequestForm_SitesSitegroups type=hidden name=FileRequestForm:SitesSitegroups:HFileRequestForm:SitesSitegroups><SPAN style="WHITE-SPACE: nowrap" name="SG_1_EnclSpan">
<A onclick="if (!Toggle('FileRequestForm:SitesSitegroups_SG_1', <link>', '<link> treeViewNodeExpand('FileRequestForm:SitesSitegroups','FileRequestForm:SitesSitegroups_SG_1', 'SG_1', 0);">
<IMG id=IFileRequestForm:SitesSitegroups_SG_1 height=16 src="<link>" width=16></A><INPUT id=CFileRequestForm:SitesSitegroups_SG_1 onclick="SetCheckedNode('FileRequestForm:SitesSitegroups_SG_1', this.checked); if (typeof treeViewCheckboxonclick != 'undefined') return treeViewCheckboxonclick('FileRequestForm:SitesSitegroups_SG_1', this.checked);" type=checkbox name=SG><IMG height=16 hspace=2 src="<link>" width=16 border=0><A name=SG_Text>World</A><A style="DISPLAY: none; COLOR: red" name=SG_Marker>*</A></SPAN><BR>
<DIV id=DFileRequestForm:SitesSitegroups_SG_1 style="DISPLAY: none"></DIV></DIV></TD>
<TD vAlign=top align=right width="10%"><SPAN id=FileRequestForm_SubjectsLabel>Subjects</SPAN></TD>
<TD vAlign=top><!-- START OF CONTROL -->
<TABLE cellSpacing=0 cellPadding=0 width=218 border=0>

Similar Issue:

Trying to click an object in a form that opens a window. It keeps saying object not found.

$Frametype = _IEFrameGetObjByName($oIE,"main")

$Formname = _IEFormGetObjByName($Frametype,"Form1")

$FieldName = _IEFormGetObjByName($Formname,"FileRequestForm_Subjects_ShowHideBtn")

_IEAction($FieldName,"click")

<DIV id=FileRequestForm_Subjects_LabelDiv onmouseover="this.style.cursor='pointer'" title="Click to edit" style="WIDTH: 100%; CURSOR: pointer" onclick="var showOrHide=showHide('FileRequestForm_Subjects'); if(typeof(AjaxSelectionGridShowHide) == 'function') {AjaxSelectionGridShowHide('FileRequestForm_Subjects', showOrHide);}return false;"><INPUT id=FileRequestForm_Subjects_ShowHideBtn type=image alt="" src="<link>" border=0 name=FileRequestForm_Subjects_ShowHideBtn><SPAN id=FileRequestForm_Subjects_Label></SPAN> </DIV>
<DIV id=FileRequestForm_Subjects_Working1 style="DISPLAY: none" noWrap>Working<IMG src="<link>" border=0></DIV>

Any help with this would be appreciated. If more information is need, please ask =)

Edited by MacBain00

-Work Smarter, Not Harder, Use More AutoIT

Link to comment
Share on other sites

NVM Guys. I guess I just needed a clear head in the morning to figure this out.

It was so simple it makes me sad that I had to post it:

Solution to 1:

$Frametype = _IEFrameGetObjByName($oIE,"main")

$Formname = _IEFormGetObjByName($Frametype,"Form1")

_IEFormElementCheckBoxSelect($Formname,0, "", 1, "byIndex")

Solution to 2:

$Frametype = _IEFrameGetObjByName($oIE,"main")

$Formname = _IEFormGetObjByName($Frametype,"Form1")

_IEFormImageClick($Formname,"FileRequestForm_Subjects_ShowHideBtn","name")

-Work Smarter, Not Harder, Use More AutoIT

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...