Unable to write content in element of iframe

hello,I have tried almost everything to write some text “Passed” inside an Iframe by selenium webdriver automation. Could you please help. here is the HTML Code.

<document>
<html class=”dj_gecko dj_ff31 dj_contentbox jazz-ui lang=”en>
<head>
<body class=”claro com-ibm-rqm-web rqm-print com-ibm-rational-asq>
<span id=”com-ibm-rqm-app-ruler-node class=”field-label style=”position: absolute; left: -3000px; font-family: Arial,san-serif; font-size: 10pt; font-weight: bold;>Categories</span>
<noscript><div id=”net-jazz-ajax-NoScriptMessage”>Javascript is either disabled or not available in your Browser</div></noscript>
<div id=”net-jazz-ajax-WorkbenchRoot>
<div id=”jazz_ui_PageTemplate_0 class=”jazz-ui-PageTemplate scroll-under nav-fixed style=”” widgetid=”jazz_ui_PageTemplate_0>
<div class=”jazz-ui-PageTemplate-skip>
<div dojoattachpoint=”_aboveBannerNode>
<div class=”banner role=”banner dojoattachpoint=”_banner>
<div class=”navbar-wrapper dojoattachpoint=”_navbarWrapper style=”height: 26.6px;>
<table class=”content-table dojoattachpoint=”_table role=”presentation>
<!– Use a table to achieve expand to fit (horizontal scrolling, when needed) across browsers –>
<tbody>
<tr class=”middle-row>
<td class=”minibar-cell>
<td id=”content-cell role=”main dojoattachpoint=”_content style=”height: 418.4px;>
<div class=”status-message role=”status dojoattachpoint=”_statusMessage style=”display: none; opacity: 0; right: 536.3px; top: 26.6px; position: fixed;>Loading Rational Quality Manager…</div>
<div class=”containerNode dojoattachpoint=”containerNode>
<div id=”net-jazz-ajax-PageContainer widgetid=”net-jazz-ajax-PageContainer>
<div id=”com_ibm_rqm_planning_web_ui_internal_page_home_HomePageView_0 class=”com-ibm-rqm-web-home internalidentifier=”one-and-only-one-com-ibm-rqm-web-home-parent-root-node dojoattachpoint=”_contentArea widgetid=”com_ibm_rqm_planning_web_ui_internal_page_home_HomePageView_0>
<div dojoattachpoint=”_messageArea/>
<div dojoattachpoint=”_actionBarArea/>
<!–div dojoAttachPoint=”_globalTaskBarArea”></div–>
<div dojoattachpoint=”_relatedInfoArea>
<div id=”center-area class=”center-area dojoattachpoint=”_centerArea>
<div id=”one-and-only-one-com-ibm-rqm-web-home-page-content-area class=”non-tabbed-content-area dojoattachpoint=”_contentArea widgetid=”one-and-only-one-com-ibm-rqm-web-home-page-content-area>
<div id=”jazz_ui_MessageBox_0 class=”jazz-ui-message-box jazz-ui-message-box-noDisplay aria-live=”assertive role=”alert style=”margin-bottom: 5px; widgetid=”jazz_ui_MessageBox_0>
<div class=”tab-container-button-area-wrapper dojoattachpoint=”_tabButtonWrapper style=”display: none;>
<div class=”tab-container-content-area dojoattachpoint=”_tabContentArea>
<div id=”ContentArea_TabContainer_0 class=”dijitTabContainer dijitTabContainerTop dijitContainer dijitLayoutContainer tabStrip-disabled style=”min-height: 700px; widgetid=”ContentArea_TabContainer_0>
<div class=”dijitTabListWrapper data-dojo-attach-point=”tablistNode style=”display: none;/>
<div class=”dijitTabSpacer dijitTabContainerTop-spacer data-dojo-attach-point=”tablistSpacer/>
<div class=”dijitTabPaneWrapper dijitTabContainerTop-container data-dojo-attach-point=”containerNode style=”border: medium none;>
<div id=”ContentArea_ContentPane_0 class=”tab-pane-content dijitTabPane dijitTabContainerTop-child dijitTabContainerTop-dijitContentPane dijitHidden widgetid=”ContentArea_ContentPane_0 title=””/>
<div id=”ContentArea_ContentPane_1 class=”tab-pane-content dijitTabPane dijitTabContainerTop-child dijitTabContainerTop-dijitContentPane dijitHidden widgetid=”ContentArea_ContentPane_1 title=””>
<div id=”com_ibm_rqm_execution_web_ui_internal_view_execution_ExecutionPageBody_0 class=”com-ibm-rqm-test-widget-execution-page-body widgetid=”com_ibm_rqm_execution_web_ui_internal_view_execution_ExecutionPageBody_0 aria-selected=”false tabindex=”-1>
<div class=”” dojoattachpoint=”_titleRow>
<div dojoattachpoint=”_topContent>
<div class=”clear/>
<div class=”environment-container dojoattachpoint=”_preConditionWidget>
<div class=”” dojoattachpoint=”_executionWidget>
<div id=”com_ibm_rqm_execution_web_ui_internal_view_extension_ManualExecutionSection_0 class=”com-ibm-rqm-execution-web-ui-internal-view-extension-ManualExecutionSection dojoattachpoint=”_manualExecutionSection widgetid=”com_ibm_rqm_execution_web_ui_internal_view_extension_ManualExecutionSection_0>
<div id=”com_ibm_rqm_planning_web_ui_internal_view_construction_manualscript2_execution_ManualScriptExecutionView_0 class=”manual-script-view manual-script-execution-view widgetid=”com_ibm_rqm_planning_web_ui_internal_view_construction_manualscript2_execution_ManualScriptExecutionView_0>
<div class=”asq-progress-area style=”display: none; dojoattachpoint=”loadingProgressNode>
<div class=”view-header dojoattachpoint=”viewContextLineNode>
<div class=”editor-dock dojoattachpoint=”editorDockNode role=”presentation/>
<div id=”com_ibm_rqm_planning_web_ui_internal_view_construction_manualscript2_execution_ManualScriptExecutionView_0-toolbar class=”editor-toolbar dojoattachpoint=”toolBarNode style=”left: 0px; width: 100%;>
<div id=”com_ibm_rqm_planning_web_ui_internal_view_construction_manualscript2_ScriptViewColumnHeader_0 class=”column-header role=”presentation widgetid=”com_ibm_rqm_planning_web_ui_internal_view_construction_manualscript2_ScriptViewColumnHeader_0>
<table width=”100% cellspacing=”0 cellpadding=”0 dojoattachpoint=”stepAreaNode role=”presentation>
<tbody>
<tr>
<td valign=”top height=”100%>
<td width=”100% valign=”top height=”100%>
<div class=”viewport dojoattachpoint=”viewportNode tabindex=”-1>
<div class=”content role=”region dojoattachpoint=”contentNode>
<div id=”com_ibm_rqm_planning_web_ui_internal_view_construction_manualscript2_ScriptStepContainer_0 class=”script-step-container tabindex=”0 role=”presentation widgetid=”com_ibm_rqm_planning_web_ui_internal_view_construction_manualscript2_ScriptStepContainer_0>
<div class=”ck-editor-float style=”width: 1px; position: absolute; left: -100px; top: -100px; height: 1px;>
<div id=”cke_editor1 class=”cke_1 cke cke_reset cke_chrome cke_editor_editor1 cke_ltr cke_browser_gecko lang=”en aria-labelledby=”cke_editor1_arialbl role=”application dir=”ltr style=”width: 728px;>
<span id=”cke_editor1_arialbl class=”cke_voice_label>Rich Text Editor, editor1</span>
<div class=”cke_inner cke_reset role=”presentation>
<div id=”cke_1_contents class=”cke_contents cke_reset role=”presentation style=”height: 43px;>
<span id=”cke_55 class=”cke_voice_label>Press ALT 0 for help</span>
<iframe class=”cke_wysiwyg_frame cke_reset frameborder=”0 src=”” style=”width: 100%; height: 100%; title=”Rich Text Editor, editor1 aria-describedby=”cke_55 tabindex=”0 allowtransparency=”true/>
</div>
manjeet Default Asked on February 6, 2016 in Selenium WebDriver.
Add Comment
1 Answer(s)

Dear.. To write some code in iFrame, You need to switch to the IFrame First.
driver.switch().iframe(//Parameter code);

First go to iframe from default content then call element you want to work with, then move back to main content(i.e. outside the iframe).

kajugul Train Answered on February 8, 2016.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.