Hey, everybody. I am new to XPath and have read many guides to solve my problem. But I really don’t understand why Katalon Studio can’t insert text into the body of my iFrame.
The iFrame works fine and I have already done these tests, but with Self Healing. It doesn’t work without it, and the selector it recommends shows itself working, but it doesn’t do the set text task.
Here is a snippet of the page code, and what the inserted text looks like.
<body contenteditable="true" class="cke_editable cke_editable_themed cke_contents_ltr" spellcheck="false"><p>hey</p><p>how are you</p></body>
I use XPath //body as advised by Self-healing and in Self-healing’s case it works. But when I use this path directly, without Self-healing, I get just an empty text box, and the console says that the text is inserted and the step is passed. But there is no text and all other steps continue after that.
I also tried //body[@class=‘cke_editable cke_editable_themed cke_contents_ltr’] and css=body, but I still get an empty field instead of text and the step is marked passed.
When I tried checking the selector via Spy Web, I noticed that it wants to replace the text instead of “class” but not instead of
. And yes, the
here is created automatically when text with paragraphs is inserted. But when I try to even specify
in the XPath after , I also get the
value replaced, but not the insertion of the text itself into the field.
Without text, the code fragment looks like this:
<body contenteditable="true" class="cke_editable cke_editable_themed cke_contents_ltr" spellcheck="false"><p><br></p></body>
With text it should look like this:
<body contenteditable="true" class="cke_editable cke_editable_themed cke_editable_themed cke_contents_ltr" spellcheck="false"><p>How are you today?</p></body>
WebUI.setText(findTestObject(‘Page_Dream Singles/Element_1693377254031’), ‘How are you today?’)
After a week of agony, please help me insert text into this field!