![]() 'Fecthing the text from Text area and storing it in a variable' WebUI.switchToFrame(findTestObject('Frames/textArea_Iframe'), 60) 'Switching to text area which is situated in Iframe' WebUI.dragAndDropToObject(findTestObject('Page_jQuery_Drag and Drop Example/div_Frame_Draggable'),findTestObject('Page_jQuery_Drag and Drop Example/div_Frame_Droppable'), FailureHandling.STOP_ON_FAILURE) ![]() ![]() 'Drag the left rectangle and Drop it the right-side one' WebUI.click(findTestObject('Page_jQuery_Homepage/lnk_Droppable')) WebUI.dragAndDropByOffset(findTestObject('Page_jQuery_Drag and Drop Example/div_Frame_Draggable'),200, 38) 'Drag and drop iframe into other position' WebUI.switchToFrame(findTestObject('Page_jQuery_Drag and Drop Example/ifr_Demo Frame'),GlobalVariable.G_Timeout_Small, FailureHandling.STOP_ON_FAILURE) WebUI.click(findTestObject('Page_jQuery_Homepage/lnk_Draggable')) 'Open a browser and navigate to jQuery UI page' Import internal.GlobalVariable as GlobalVariable Import .testobject.TestObject as TestObject Import .testobject.ObjectRepository as ObjectRepository Import .model.FailureHandling as FailureHandling The sample code below shows how to switch to the parent frame before using the drag and drop action on the elements within the iframe: Given the situation where you opt not to specify the iframe parent for an element, in order to interact with the element, you need to use the Switch To Frame keyword to have Katalon focus on the parent iframe before being able to interact with the element. This is illustrated in the following screenshot (Note that you can uncheck the option to use parent iframe if needed): The Object Spy can detect, capture the iframe, and show all of the iframe's elements accordingly.Īs you save the captured object to Katalon Studio, the iframe is also included as the object's parent element. Use the Object Spy to capture the iframe as usual. Given that you want to capture the JQueryUI's Drag and Drop example (this draggable control is an iframe), as shown in the screenshot below, you can drag the 'Drag me around' object to other areas of the iframe. ![]() Then, you can proceed to set the text to the Comment field by specifying the child element for the Set Text keyword as described below: This is illustrated in the following screenshot: Once the Comment iframe is captured, Katalon shows all of its child elements, which you can see in the Object Spy dialog.Īs you save the captured object to Katalon Studio, its iframe is also included. Given that you want to capture the Comment text field of a certain question in Katalon Forum (this text field is an iframe), you can use the Web Object Spy of Katalon and see that it can detect the iframe in the red highlighted area.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |