Somebody can tell me how to click this button :(

I tried to solve the problem for 4 days and still no solution.

this is test page: 阿里云登录 - 欢迎登录阿里云,安全稳定的云计算服务平台

I want to click the submit button in a iframe, but i have no idea to do that.

here is my command and log, the console output show the button had been clicked, but not yet

katalon chrome recorder is OK,bug katalon studio is above problem occurs.

1.jpg

2.png

1 Like

Hi, yuezhang,

Sometimes a very simple “Wait for page load” or, Delay can help with these situations.

If not, you may need to check that both the iFrame object and the parent iFrame are the same and that the XPath is still the same as when the object was first created.

Hope this helps.

Josh Deverson said:

Hi, yuezhang,

Sometimes a very simple “Wait for page load” or, Delay can help with these situations.

If not, you may need to check that both the iFrame object and the parent iFrame are the same and that the XPath is still the same as when the object was first created.

Hope this helps.

thx for your reply

i had try Delay Command,but not works.
button object’s parent is iframe object. i have verified the label of button object,it’s passed. so button selector should correct.

but, i still can not click the button :frowning:

You can try to click on it using Javascript:

WebElement element = WebUiCommonHelper.findWebElement(findTestObject('your/object'),30)WebUI.executeJavaScript("arguments[0].click", Arrays.asList(element))
1 Like

@Vinh Nguyen Fix your typo…

aguments[0].click()
2 Likes

Vinh Nguyen said:

You can try to click on it using Javascript:

WebElement element = WebUiCommonHelper.findWebElement(findTestObject('your/object'),30)WebUI.executeJavaScript("arguments[0].click", Arrays.asList(element))

i change the script below, but occur another error:

import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint

import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase

import static com.kms.katalon.core.testdata.TestDataFactory.findTestData

import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject

import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint

import com.kms.katalon.core.checkpoint.CheckpointFactory as CheckpointFactory

import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as MobileBuiltInKeywords

import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile

import com.kms.katalon.core.model.FailureHandling as FailureHandling

import com.kms.katalon.core.testcase.TestCase as TestCase

import com.kms.katalon.core.testcase.TestCaseFactory as TestCaseFactory

import com.kms.katalon.core.testdata.TestData as TestData

import com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory

import com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository

import com.kms.katalon.core.testobject.TestObject as TestObject

import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords

import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS

import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords

import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

import internal.GlobalVariable as GlobalVariable

import org.openqa.selenium.Keys as Keys

import com.kms.katalon.core.webui.common.WebUiCommonHelper as WebUiCommonHelper

import org.openqa.selenium.WebElement as WebElement

WebUI.openBrowser(’’)

WebUI.navigateToUrl(‘https://account.aliyun.com/login/login.htm?spm=a2c45.11132017.495866.5.2fcb1b05ck1hYg’)

WebUI.doubleClick(findTestObject(‘P2/Page_/input_loginId’))

WebUI.setText(findTestObject(‘P2/Page_/input_loginId’), ‘foo’)

WebUI.click(findTestObject(‘P2/Page_/input_submit-btn’))

WebElement element = WebUiCommonHelper.findWebElement(findTestObject(‘P2/Page_/input_submit-btn’), 30)

WebUI.executeJavaScript(‘arguments[0].click()’, Arrays.asList(element))

3.jpg