Input Text in RTE (iFrame) is becoming null after page refreshed/saved - VBA Macros

Vino22

New Member
Joined
Jan 9, 2019
Messages
1
Planning to create a Test data (i.e. Record) for my Project. As part of it, trying to create a Test data by automating Web application through VBA.

I am able to enter/input data for all the fields including (RTE - Rich Text Editor), once the page is refreshed/Saved RTE input data becomes null rest working as expected.
Used the below Code and the text is displayed as expected but after Saving/refreshing the page it become nullified
Set HTMLElements = oFrameDoc.getElementsByTagName("iframe")
For Each iFrame In HTMLElements
If (InStr(1, Trim(iFrame.Title), strSplit(1), vbTextCompare)) Then
Set HTMLBody = iFrame.contentWindow.document.body
HTMLBody.innerHTML = "<p>Testing</p>"
iFrame.contentWindow.Window.Close
Exit For
End If

Note: Below Bold Letter under P tag is become null

Source Page (Web Page):
******** tabindex="0" title="Rich Text Editor, 1174rtf, Press ALT 0 for help" class="cke_wysiwyg_frame cke_reset" aria-describedby="cke_67" src="javascript:void(function(){document.open()%3B(function()%7Bfor(var%20a%3B%3B)try%7Ba%3Dwindow.parent.document.domain%3Bbreak%7Dcatch(e)%7Ba%3Da%3Fa.replace(%2F.%2B%3F(%3F%3A%5C.%7C%24)%2F%2C%22%22)%3Adocument.domain%3Bif(!a)break%3Bdocument.domain%3Da%7Dreturn!!a%7D)()%3Bdocument.close()%3B}())" frameborder="0" style="width: 100%; height: 100%;" allowtransparency="true">


<!DOCTYPE html>


<html class="CSS1Compat" lang="en" dir="ltr"><head>******** data-cke-temp="1">(function(){for(var a;;)try{a=window.parent.document.domain;break}catch(e){a=a?a.replace(/.+?(?:\.|$)/,""):document.domain;if(!a)break;document.domain=a}return!!a})();*********><title data-cke-title="Rich Text Editor, 1174rtf, Press ALT 0 for help">Rich Text Editor, 1174rtf, Press ALT 0 for help</title><style data-cke-temp="1">html.CSS1Compat [contenteditable=false]{min-height:0 !important}
html.CSS1Compat abbr[contenteditable=false],html.CSS1Compat acronym[contenteditable=false],html.CSS1Compat b[contenteditable=false],html.CSS1Compat bdi[contenteditable=false],html.CSS1Compat bdo[contenteditable=false],html.CSS1Compat big[contenteditable=false],html.CSS1Compat cite[contenteditable=false],html.CSS1Compat code[contenteditable=false],html.CSS1Compat del[contenteditable=false],html.CSS1Compat dfn[contenteditable=false],html.CSS1Compat em[contenteditable=false],html.CSS1Compat font[contenteditable=false],html.CSS1Compat i[contenteditable=false],html.CSS1Compat ins[contenteditable=false],html.CSS1Compat label[contenteditable=false],html.CSS1Compat kbd[contenteditable=false],html.CSS1Compat mark[contenteditable=false],html.CSS1Compat meter[contenteditable=false],html.CSS1Compat output[contenteditable=false],html.CSS1Compat q[contenteditable=false],html.CSS1Compat ruby[contenteditable=false],html.CSS1Compat s[contenteditable=false],html.CSS1Compat samp[contenteditable=false],html.CSS1Compat small[contenteditable=false],html.CSS1Compat span[contenteditable=false],html.CSS1Compat strike[contenteditable=false],html.CSS1Compat strong[contenteditable=false],html.CSS1Compat sub[contenteditable=false],html.CSS1Compat sup[contenteditable=false],html.CSS1Compat time[contenteditable=false],html.CSS1Compat tt[contenteditable=false],html.CSS1Compat u[contenteditable=false],html.CSS1Compat var[contenteditable=false]{display:inline-block}
html{cursor:text;*cursor:auto}
img,input,textarea{cursor:default}</style><link href="http://sjtwapptstg01.na.gilead.com/gtrack/servlet/TeamAccess/ckeditor/contents.css?t=F0RD" rel="stylesheet" type="text/css"><style data-cke-temp="1">.cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}
img.cke_flash{background-image: url(http://sjtwapptstg01.na.gilead.com/.../placeholder.png?t=F0RD);background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 80px;height: 80px;}
.cke_editable form{border: 1px dotted #FF0000;padding: 2px;}


img.cke_hidden{background-image: url(http://sjtwapptstg01.na.gilead.com/.../hiddenfield.gif?t=F0RD);background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 16px !important;height: 16px !important;}
img.cke_iframe{background-image: url(http://sjtwapptstg01.na.gilead.com/.../placeholder.png?t=F0RD);background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 80px;height: 80px;}
.cke_contents_ltr a.cke_anchor,.cke_contents_ltr a.cke_anchor_empty,.cke_editable.cke_contents_ltr a[name],.cke_editable.cke_contents_ltr a[data-cke-saved-name]{background:url(http://sjtwapptstg01.na.gilead.com/...keditor/plugins/link/images/anchor.png?t=F0RD) no-repeat left center;border:1px dotted #00f;background-size:16px;padding-left:18px;cursor:auto;}.cke_contents_ltr img.cke_anchor{background:url(http://sjtwapptstg01.na.gilead.com/...keditor/plugins/link/images/anchor.png?t=F0RD) no-repeat left center;border:1px dotted #00f;background-size:16px;width:16px;min-height:15px;height:1.15em;vertical-align:text-bottom;}.cke_contents_rtl a.cke_anchor,.cke_contents_rtl a.cke_anchor_empty,.cke_editable.cke_contents_rtl a[name],.cke_editable.cke_contents_rtl a[data-cke-saved-name]{background:url(http://sjtwapptstg01.na.gilead.com/...keditor/plugins/link/images/anchor.png?t=F0RD) no-repeat right center;border:1px dotted #00f;background-size:16px;padding-right:18px;cursor:auto;}.cke_contents_rtl img.cke_anchor{background:url(http://sjtwapptstg01.na.gilead.com/...keditor/plugins/link/images/anchor.png?t=F0RD) no-repeat right center;border:1px dotted #00f;background-size:16px;width:16px;min-height:15px;height:1.15em;vertical-align:text-bottom;}
div.cke_pagebreak{background:url(http://sjtwapptstg01.na.gilead.com/...plugins/pagebreak/images/pagebreak.gif?t=F0RD) no-repeat center center !important;clear:both !important;width:100% !important;border-top:#999 1px dotted !important;border-bottom:#999 1px dotted !important;padding:0 !important;height:5px !important;cursor:default !important;}
.cke_show_blocks h6:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks h5:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks h4:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks h3:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks h2:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks h1:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks blockquote:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks address:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks pre:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks div:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks p:not([contenteditable=false]):not(.cke_show_blocks_off){background-repeat:no-repeat;border:1px dotted gray;padding-top:8px}.cke_show_blocks h6:not([contenteditable=false]):not(.cke_show_blocks_off){background-image:url(http://sjtwapptstg01.na.gilead.com/gtrack/servlet/TeamAccess/ckeditor/plugins/showblocks/images/block_h6.png?t=F0RD)}.cke_show_blocks h5:not([contenteditable=false]):not(.cke_show_blocks_off){background-image:url(http://sjtwapptstg01.na.gilead.com/gtrack/servlet/TeamAccess/ckeditor/plugins/showblocks/images/block_h5.png?t=F0RD)}.cke_show_blocks h4:not([contenteditable=false]):not(.cke_show_blocks_off){background-image:url(http://sjtwapptstg01.na.gilead.com/gtrack/servlet/TeamAccess/ckeditor/plugins/showblocks/images/block_h4.png?t=F0RD)}.cke_show_blocks h3:not([contenteditable=false]):not(.cke_show_blocks_off){background-image:url(http://sjtwapptstg01.na.gilead.com/gtrack/servlet/TeamAccess/ckeditor/plugins/showblocks/images/block_h3.png?t=F0RD)}.cke_show_blocks h2:not([contenteditable=false]):not(.cke_show_blocks_off){background-image:url(http://sjtwapptstg01.na.gilead.com/gtrack/servlet/TeamAccess/ckeditor/plugins/showblocks/images/block_h2.png?t=F0RD)}.cke_show_blocks h1:not([contenteditable=false]):not(.cke_show_blocks_off){background-image:url(http://sjtwapptstg01.na.gilead.com/gtrack/servlet/TeamAccess/ckeditor/plugins/showblocks/images/block_h1.png?t=F0RD)}.cke_show_blocks blockquote:not([contenteditable=false]):not(.cke_show_blocks_off){background-image:url(http://sjtwapptstg01.na.gilead.com/gtrack/servlet/TeamAccess/ckeditor/plugins/showblocks/images/block_blockquote.png?t=F0RD)}.cke_show_blocks address:not([contenteditable=false]):not(.cke_show_blocks_off){background-image:url(http://sjtwapptstg01.na.gilead.com/gtrack/servlet/TeamAccess/ckeditor/plugins/showblocks/images/block_address.png?t=F0RD)}.cke_show_blocks pre:not([contenteditable=false]):not(.cke_show_blocks_off){background-image:url(http://sjtwapptstg01.na.gilead.com/gtrack/servlet/TeamAccess/ckeditor/plugins/showblocks/images/block_pre.png?t=F0RD)}.cke_show_blocks div:not([contenteditable=false]):not(.cke_show_blocks_off){background-image:url(http://sjtwapptstg01.na.gilead.com/gtrack/servlet/TeamAccess/ckeditor/plugins/showblocks/images/block_div.png?t=F0RD)}.cke_show_blocks p:not([contenteditable=false]):not(.cke_show_blocks_off){background-image:url(http://sjtwapptstg01.na.gilead.com/gtrack/servlet/TeamAccess/ckeditor/plugins/showblocks/images/block_p.png?t=F0RD)}.cke_show_blocks.cke_contents_ltr h6:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks.cke_contents_ltr h5:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks.cke_contents_ltr h4:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks.cke_contents_ltr h3:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks.cke_contents_ltr h2:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks.cke_contents_ltr h1:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks.cke_contents_ltr blockquote:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks.cke_contents_ltr address:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks.cke_contents_ltr pre:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks.cke_contents_ltr div:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks.cke_contents_ltr p:not([contenteditable=false]):not(.cke_show_blocks_off){background-position:top left;padding-left:8px}.cke_show_blocks.cke_contents_rtl h6:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks.cke_contents_rtl h5:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks.cke_contents_rtl h4:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks.cke_contents_rtl h3:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks.cke_contents_rtl h2:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks.cke_contents_rtl h1:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks.cke_contents_rtl blockquote:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks.cke_contents_rtl address:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks.cke_contents_rtl pre:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks.cke_contents_rtl div:not([contenteditable=false]):not(.cke_show_blocks_off),.cke_show_blocks.cke_contents_rtl p:not([contenteditable=false]):not(.cke_show_blocks_off){background-position:top right;padding-right:8px}
.cke_show_borders table.cke_show_border,.cke_show_borders table.cke_show_border > tr > td, .cke_show_borders table.cke_show_border > tr > th,.cke_show_borders table.cke_show_border > tbody > tr > td, .cke_show_borders table.cke_show_border > tbody > tr > th,.cke_show_borders table.cke_show_border > thead > tr > td, .cke_show_borders table.cke_show_border > thead > tr > th,.cke_show_borders table.cke_show_border > tfoot > tr > td, .cke_show_borders table.cke_show_border > tfoot > tr > th{border : #d3d3d3 1px dotted}</style></head>****** class="cke_editable cke_editable_themed cke_contents_ltr cke_show_borders" contenteditable="true" hidefocus="" spellcheck="false"><p>Testing</p></body></html>
*********>


******** id="iframe1174rtf" src="blank.html" frameborder="0" scrolling="no" style="left: 40px; top: 40px; visibility: hidden; position: absolute;">
<html><head>
<link href="http://sjtwapptstg01/gtrack/images/favicon.ico" rel="icon" type="image/x-icon">
<link href="http://sjtwapptstg01.na.gilead.com/gtrack/images/favicon.ico" rel="icon" type="image/x-icon">
<title></title>
****** http-equiv="Expires" content="-1">
</head>


******>




</body></html>
*********>
<input name="Requirement Reference" id="Requirement Reference" type="hidden" value="">
<input name="1174rtfName" type="hidden" value="Requirement Reference">
<input name="bta1174rtfLoaded" type="hidden" value="true">
<input name="bta1174rtfChanged" type="hidden" value="false">
 

Some videos you may like

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Watch MrExcel Video

Forum statistics

Threads
1,122,630
Messages
5,597,277
Members
414,133
Latest member
lucid33

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top