Tarun
Katalon Apprentice
09/13/2018

Katalon unable to enter value at TextBox of Iframe

Somehow katalon unable to enter values in text box ,tried both ways using
1)Katalon Recorder and
2)Manual coding
Basically text box is under of Iframe

Here is Error logs
09-13-2018 01:18:28 PM - [START]  - Start Test Case : Test Cases/AccCreateCoppaAccount/AccCreateCoppaAccount
09-13-2018 01:18:28 PM - [INFO]   - Evaluating variables for test case
09-13-2018 01:18:28 PM - [START]  - Start action : openBrowser
09-13-2018 01:18:28 PM - [INFO]   - Opening browser
09-13-2018 01:18:28 PM - [INFO]   - Starting 'Chrome' driver
09-13-2018 01:18:28 PM - [INFO]   - Action delay is set to 0 seconds
Starting ChromeDriver 2.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73) on port 48942
Only local connections are allowed.
Sep 13, 2018 1:18:32 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
09-13-2018 01:18:32 PM - [RUN_DATA] - Logging run data 'sessionId' with value '2f3d010df3bd41e4b37c75bb99c35e89'
09-13-2018 01:18:32 PM - [RUN_DATA] - Logging run data 'browser' with value 'Chrome 68.0.3440.106'
09-13-2018 01:18:32 PM - [RUN_DATA] - Logging run data 'platform' with value 'Windows 10'
09-13-2018 01:18:32 PM - [RUN_DATA] - Logging run data 'seleniumVersion' with value '3.7.1'
09-13-2018 01:18:32 PM - [RUN_DATA] - Logging run data 'proxyInformation' with value 'ProxyInformation{proxyOption=NO_PROXY, proxyServerType=HTTP, password=, proxyServerAddress=, proxyServerPort=0}'
09-13-2018 01:18:32 PM - [PASSED] - Browser is opened with url: ''
09-13-2018 01:18:32 PM - [END]    - End action : openBrowser
09-13-2018 01:18:32 PM - [START]  - Start action : navigateToUrl
09-13-2018 01:18:32 PM - [INFO]   - Checking url
09-13-2018 01:18:32 PM - [INFO]   - Navigating to 'https://webr12accountss.com/'
09-13-2018 01:18:33 PM - [PASSED] - Navigate to 'https://webr12accountscom/' successfully
09-13-2018 01:18:33 PM - [END]    - End action : navigateToUrl
09-13-2018 01:18:33 PM - [START]  - Start action : click
09-13-2018 01:18:33 PM - [INFO]   - Finding Test Object with id 'Object Repository/Page_Create Your  Account/button_Create Account'
09-13-2018 01:18:33 PM - [INFO]   - Checking object
09-13-2018 01:18:33 PM - [INFO]   - Checking timeout
09-13-2018 01:18:33 PM - [INFO]   - Finding web element with id: 'Object Repository/Page_Create Your  Account/button_Create Account' located by 'By.xpath: //button[@id='join']' in '30' second(s)
09-13-2018 01:18:33 PM - [INFO]   - Found 1 web elements with id: 'Object Repository/Page_Create Your  Account/button_Create Account' located by 'By.xpath: //button[@id='join']' in '30' second(s)
09-13-2018 01:18:33 PM - [INFO]   - Clicking on object: 'Object Repository/Page_Create Your  Account/button_Create Account'
09-13-2018 01:18:33 PM - [PASSED] - Object: 'Object Repository/Page_Create Your  Account/button_Create Account' is clicked on
09-13-2018 01:18:33 PM - [END]    - End action : click
09-13-2018 01:18:33 PM - [START]  - Start action : setText
09-13-2018 01:18:33 PM - [INFO]   - Finding Test Object with id 'Object Repository/Page_Create Your  Account/input_First Name_firstname'
09-13-2018 01:18:33 PM - [INFO]   - Checking object
09-13-2018 01:18:33 PM - [INFO]   - Checking text
09-13-2018 01:18:33 PM - [INFO]   - Checking timeout
09-13-2018 01:18:33 PM - [INFO]   - Finding web element with id: 'Object Repository/Page_Create Your  Account/input_First Name_firstname' located by 'By.xpath: //input[@id='firstname']' in '30' second(s)
09-13-2018 01:19:05 PM - [INFO]   - Found web element with id: 'Object Repository/Page_Create Your  Account/input_First Name_firstname' using heuristic method. Matching attributes: [tag].
09-13-2018 01:19:05 PM - [INFO]   - Web element found by heuristic method is not used because we can't guarantee it reflects the intended element.
09-13-2018 01:19:05 PM - [INFO]   - You should consult our guide in choosing attributes : https://docs.katalon.com/x/fhlO
09-13-2018 01:19:05 PM - [INFO]   - Web element found by trial and error method is not used because we can't guarantee it reflects the intended element.
09-13-2018 01:19:06 PM - [FAILED] - Unable to set text 'flakiness' of object 'Object Repository/Page_Create Your  Account/input_First Name_firstname' (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: 'Object Repository/Page_Create Your  Account/input_First Name_firstname' located by 'By.xpath: //input[@id='firstname']' not found)
09-13-2018 01:19:06 PM - [END]    - End action : setText
09-13-2018 01:19:06 PM - [FAILED] - Test Cases/AccCreateCoppaAccount/AccCreateCoppaAccount FAILED because (of) (Stack trace: com.kms.katalon.core.exception.StepFailedException: Unable to set text 'flakiness' of object 'Object Repository/Page_Create Your  Account/input_First Name_firstname' (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: 'Object Repository/Page_Create Your  Account/input_First Name_firstname' located by 'By.xpath: //input[@id='firstname']' not found)
 at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)
 at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)
 at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)
 at com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword.setText(SetTextKeyword.groovy:65)
 at com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword.execute(SetTextKeyword.groovy:37)
 at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)
 at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.setText(WebUiBuiltInKeywords.groovy:950)
 at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$setText$2.call(Unknown Source)
 at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
 at Script1536857306109.run(Script1536857306109.groovy:22)
 at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:183)
 at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:108)
 at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:294)
 at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:285)
 at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:264)
 at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:256)
 at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:200)
 at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:99)
 at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:90)
 at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
 at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:149)
 at TempTestCase1536869905716.run(TempTestCase1536869905716.groovy:22)
 at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263)
 at groovy.lang.GroovyShell.run(GroovyShell.java:518)
 at groovy.lang.GroovyShell.run(GroovyShell.java:507)
 at groovy.ui.GroovyMain.processOnce(GroovyMain.java:653)
 at groovy.ui.GroovyMain.run(GroovyMain.java:384)
 at groovy.ui.GroovyMain.process(GroovyMain.java:370)
 at groovy.ui.GroovyMain.processArgs(GroovyMain.java:129)
 at groovy.ui.GroovyMain.main(GroovyMain.java:109)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498)
 at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:109)
 at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:131)
)
09-13-2018 01:19:06 PM - [END]    - End Test Case : Test Cases/AccCreateCoppaAccount/AccCreateCoppaAccount
Here is element HTML
<input class="textbox" data-state="0" data-val-required="true" data-val-required-error="This is a required field." id="firstname" maxlength="80" name="firstname" rel="0" type="text" value="">
=============================================
xpath created :- //input[@id='firstname']
Upvote
Quote

Comments

  • kazurayam
    Katalon Evangelist
    09/16/2018
    edited September 17
    I tried to replicate your problem on my side based on the screenshot you provided. I failed to replicate 100% your problem but, Katalon Studio worked well. I did not find anything curious about Katalon Studio in finding elements in iframe.

    09-15-2018 04:52:41 PM - [FAILED] - Test Cases/AccCreateCoppaAccount/AccCreateCoppaAccount FAILED because (of) (Stack trace: com.kms.katalon.core.exception.StepFailedException: Unable to verify image 'Object Repository/Page_Create Your Wizards Account/iframe_concat(id(wotcAccount' present (Root cause: java.lang.IllegalArgumentException: Cannot find elements when the XPath expression is null.)

    The message "when the XPath expression is null" gives me an impression that Groovy scripts in your project are incompletely compiled for some reason, and the binary class files are inconsistent. I have ever experienced similar situation some times possibly when I changed the project name, when I upgraded the Katalon Studio, when I imported source from outside, etc.

    Tarun,

    I would suggest to you to "force Groovy to compile all source codes from scratch, and renew class files completely". 

    How to do it? It is simple.

    1. close your project, or shutdown Katalon Studio GUI.
    2. delete the <your katalon project directory>/bin directory
    3. restart Katalon Studio, open the project
    4. re-run the test
    Best Answer
    Upvote
    Quote
  • kazurayam
    Katalon Evangelist
    09/13/2018
    You need to switch into the iframe.  
    See https://docs.katalon.com/display/KD/[WebUI]+Switch+To+Frame
    I am afraid that your test case does not call WebUI.switchToFrame(...) , does it?
    Upvote
    Quote
  • Tarun
    Katalon Apprentice
    09/13/2018
    It was doing as a part of parent object in xpath ,but still I wrote a code like below,even after switching ,its unable to set text,trust I did this so many times in so many websites but this is not working :( Its really strange when I execute the code in katalon recorder chrome plugin test case executes fine but after I export as katalon script its failing 

    It was doing as a part of parent object in xpath ,but still I wrote a code like below,even after switching ,its unable to set text,trust I did this so many times in so many websites but this is not working :(
    09-13-2018 04:43:33 PM - [START]  - Start Test Case : Test Cases/AccCreateCoppaAccount/AccCreateCoppaAccount
    09-13-2018 04:43:33 PM - [INFO]   - Evaluating variables for test case
    09-13-2018 04:43:34 PM - [START]  - Start action : openBrowser
    09-13-2018 04:43:34 PM - [INFO]   - Opening browser
    09-13-2018 04:43:34 PM - [INFO]   - Starting 'Chrome' driver
    09-13-2018 04:43:34 PM - [INFO]   - Action delay is set to 0 seconds
    Starting ChromeDriver 2.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73) on port 20116
    Only local connections are allowed.
    Sep 13, 2018 4:43:40 PM org.openqa.selenium.remote.ProtocolHandshake createSession
    INFO: Detected dialect: OSS
    09-13-2018 04:43:40 PM - [RUN_DATA] - Logging run data 'sessionId' with value 'e4b38355ede9cee65178f56a27a3fb38'
    09-13-2018 04:43:40 PM - [RUN_DATA] - Logging run data 'browser' with value 'Chrome 68.0.3440.106'
    09-13-2018 04:43:40 PM - [RUN_DATA] - Logging run data 'platform' with value 'Windows 10'
    09-13-2018 04:43:40 PM - [RUN_DATA] - Logging run data 'seleniumVersion' with value '3.7.1'
    09-13-2018 04:43:40 PM - [RUN_DATA] - Logging run data 'proxyInformation' with value 'ProxyInformation{proxyOption=NO_PROXY, proxyServerType=HTTP, password=, proxyServerAddress=, proxyServerPort=0}'
    09-13-2018 04:43:40 PM - [PASSED] - Browser is opened with url: ''
    09-13-2018 04:43:40 PM - [END]    - End action : openBrowser
    09-13-2018 04:43:40 PM - [START]  - Start action : navigateToUrl
    09-13-2018 04:43:40 PM - [INFO]   - Checking url
    09-13-2018 04:43:40 PM - [INFO]   - Navigating to 'https://webr12accounts.com/'
    09-13-2018 04:43:42 PM - [PASSED] - Navigate to 'https://webr12accounts.com/' successfully
    09-13-2018 04:43:42 PM - [END]    - End action : navigateToUrl
    09-13-2018 04:43:42 PM - [START]  - Start action : click
    09-13-2018 04:43:42 PM - [INFO]   - Finding Test Object with id 'Object Repository/Page_Create Your  Account/button_Create Account'
    09-13-2018 04:43:42 PM - [INFO]   - Checking object
    09-13-2018 04:43:42 PM - [INFO]   - Checking timeout
    09-13-2018 04:43:42 PM - [INFO]   - Finding web element with id: 'Object Repository/Page_Create Your  Account/button_Create Account' located by 'By.xpath: //button[@id='join']' in '30' second(s)
    09-13-2018 04:43:42 PM - [INFO]   - Found 1 web elements with id: 'Object Repository/Page_Create Your  Account/button_Create Account' located by 'By.xpath: //button[@id='join']' in '30' second(s)
    09-13-2018 04:43:42 PM - [INFO]   - Clicking on object: 'Object Repository/Page_Create Your  Account/button_Create Account'
    09-13-2018 04:43:42 PM - [PASSED] - Object: 'Object Repository/Page_Create Your  Account/button_Create Account' is clicked on
    09-13-2018 04:43:42 PM - [END]    - End action : click
    09-13-2018 04:43:42 PM - [START]  - Start action : switchToFrame
    09-13-2018 04:43:42 PM - [INFO]   - Finding Test Object with id 'Object Repository/Page_Create Your  Account/iframe_concat(id(  wotcAccount'
    09-13-2018 04:43:42 PM - [INFO]   - Switching to iframe: 'Object Repository/Page_Create Your  Account/iframe_concat(id(  wotcAccount'
    09-13-2018 04:43:42 PM - [INFO]   - Checking timeout
    09-13-2018 04:43:42 PM - [INFO]   - Finding web element with id: 'Object Repository/Page_Create Your  Account/iframe_concat(id(  wotcAccount' located by 'By.xpath: //iframe[@id='wotcAccountWidgetModalIframe']' in '5' second(s)
    09-13-2018 04:43:42 PM - [INFO]   - Found 1 web elements with id: 'Object Repository/Page_Create Your  Account/iframe_concat(id(  wotcAccount' located by 'By.xpath: //iframe[@id='wotcAccountWidgetModalIframe']' in '5' second(s)
    09-13-2018 04:43:42 PM - [INFO]   - Switched to iframe: 'Object Repository/Page_Create Your  Account/iframe_concat(id(  wotcAccount'
    09-13-2018 04:43:42 PM - [END]    - End action : switchToFrame
    09-13-2018 04:43:42 PM - [START]  - Start action : setText
    09-13-2018 04:43:42 PM - [INFO]   - Finding Test Object with id 'Object Repository/Page_Create Your  Account/input_First Name_firstname'
    09-13-2018 04:43:42 PM - [INFO]   - Checking object
    09-13-2018 04:43:42 PM - [INFO]   - Checking text
    09-13-2018 04:43:42 PM - [INFO]   - Checking timeout
    09-13-2018 04:43:42 PM - [INFO]   - Finding web element with id: 'Object Repository/Page_Create Your  Account/input_First Name_firstname' located by 'By.xpath: //input[@id='firstname']' in '30' second(s)
    09-13-2018 04:44:14 PM - [INFO]   - Found web element with id: 'Object Repository/Page_Create Your  Account/input_First Name_firstname' using heuristic method. Matching attributes: [tag].
    09-13-2018 04:44:14 PM - [INFO]   - Web element found by heuristic method is not used because we can't guarantee it reflects the intended element.
    09-13-2018 04:44:14 PM - [INFO]   - You should consult our guide in choosing attributes : https://docs.katalon.com/x/fhlO
    09-13-2018 04:44:14 PM - [INFO]   - Web element found by trial and error method is not used because we can't guarantee it reflects the intended element.
    09-13-2018 04:44:15 PM - [FAILED] - Unable to set text 'jjj' of object 'Object Repository/Page_Create Your  Account/input_First Name_firstname' (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: 'Object Repository/Page_Create Your  Account/input_First Name_firstname' located by 'By.xpath: //input[@id='firstname']' not found)
    09-13-2018 04:44:15 PM - [END]    - End action : setText
    09-13-2018 04:44:15 PM - [FAILED] - Test Cases/AccCreateCoppaAccount/AccCreateCoppaAccount FAILED because (of) (Stack trace: com.kms.katalon.core.exception.StepFailedException: Unable to set text 'jjj' of object 'Object Repository/Page_Create Your  Account/input_First Name_firstname' (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: 'Object Repository/Page_Create Your  Account/input_First Name_firstname' located by 'By.xpath: //input[@id='firstname']' not found)
     at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)
     at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)
     at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)
     at com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword.setText(SetTextKeyword.groovy:65)
     at com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword.execute(SetTextKeyword.groovy:37)
     at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)
     at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.setText(WebUiBuiltInKeywords.groovy:950)
     at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$setText$3.call(Unknown Source)
     at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
     at Script1536857306109.run(Script1536857306109.groovy:24)
     at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:183)
     at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:108)
     at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:294)
     at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:285)
     at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:264)
     at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:256)
     at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:200)
     at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:99)
     at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:90)
     at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
     at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:149)
     at TempTestCase1536882205892.run(TempTestCase1536882205892.groovy:22)
     at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263)
     at groovy.lang.GroovyShell.run(GroovyShell.java:518)
     at groovy.lang.GroovyShell.run(GroovyShell.java:507)
     at groovy.ui.GroovyMain.processOnce(GroovyMain.java:653)
     at groovy.ui.GroovyMain.run(GroovyMain.java:384)
     at groovy.ui.GroovyMain.process(GroovyMain.java:370)
     at groovy.ui.GroovyMain.processArgs(GroovyMain.java:129)
     at groovy.ui.GroovyMain.main(GroovyMain.java:109)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:498)
     at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:109)
     at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:131)
    )
    09-13-2018 04:44:15 PM - [END]    - End Test Case : Test Cases/AccCreateCoppaAccount/AccCreateCoppaAccount
    Upvote
    Quote
  • kazurayam
    Katalon Evangelist
    09/14/2018
    I wrote a code like below

    I do not find your code. Could you paste your test case code here?

    Upvote
    Quote
  • kazurayam
    Katalon Evangelist
    09/14/2018
    09-13-2018 04:44:14 PM - [INFO]   - Web element found by heuristic method is not used because we can't guarantee it reflects the intended element.

    This seems to be a duplicate as this:

    https://forum.katalon.com/discussion/9004/issue-with-webui-waitforelementpresent-and-webui-waitforelementvisible-in-katalon-5-6

    may be a bug in Katalon?
    Upvote
    Quote
  • kazurayam
    Katalon Evangelist
    09/14/2018
    09-13-2018 04:44:14 PM - [INFO]   - Found web element with id: 'Object Repository/Page_Create Your  Account/input_First Name_firstname' using heuristic method. Matching attributes: [tag].
    I am curious how the Test Object 'Object Repository/Page_Create Your  Account/input_First Name_firstname' is defined. Could you take screenshot of its definition and paste it here?

    Upvote
    Quote
  • Tarun
    Katalon Apprentice
    09/14/2018
    kazurayam said:
    09-13-2018 04:44:14 PM - [INFO]   - Web element found by heuristic method is not used because we can't guarantee it reflects the intended element.

    This seems to be a duplicate as this:

    https://forum.katalon.com/discussion/9004/issue-with-webui-waitforelementpresent-and-webui-waitforelementvisible-in-katalon-5-6

    may be a bug in Katalon?

    yes its a bug in katalon
    Upvote
    Quote
  • Tarun
    Katalon Apprentice
    09/14/2018
    edited September 14
    kazurayam said:
    09-13-2018 04:44:14 PM - [INFO]   - Found web element with id: 'Object Repository/Page_Create Your  Account/input_First Name_firstname' using heuristic method. Matching attributes: [tag].
    I am curious how the Test Object 'Object Repository/Page_Create Your  Account/input_First Name_firstname' is defined. Could you take screenshot of its definition and paste it here?



    1.PNG 404.6K
    1.PNG 403.3K
    Upvote
    Quote
  • Tarun
    Katalon Apprentice
    09/14/2018
    Tarun said:
    kazurayam said:
    09-13-2018 04:44:14 PM - [INFO]   - Found web element with id: 'Object Repository/Page_Create Your  Account/input_First Name_firstname' using heuristic method. Matching attributes: [tag].
    I am curious how the Test Object 'Object Repository/Page_Create Your  Account/input_First Name_firstname' is defined. Could you take screenshot of its definition and paste it here?




    Also There is a Form element if you see above element screenshot ,do I need to go inside form element and then do a set text? to make this code working, this happened to be  very straightforward thing but why its not working I am perplexed
    Upvote
    Quote
  • Tarun
    Katalon Apprentice
    09/14/2018
    Here is entire script
    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.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
    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.testdata.TestData as TestData
    import com.kms.katalon.core.testobject.TestObject as TestObject
    import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
    import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
    import internal.GlobalVariable as GlobalVariable
    WebUI.openBrowser('')
    WebUI.navigateToUrl('https://webr12accounts.com/')
    WebUI.click(findTestObject('Object Repository/Page_Create Your Wizards Account/button_Create Account'))
    WebUI.switchToFrame(findTestObject('Page_Create Your Wizards Account/iframe_concat(id(  wotcAccount'), 5)
    WebUI.setText(findTestObject('Object Repository/Page_Create Your Wizards Account/input_First Name_firstname'), 'jjj')

    Upvote
    Quote
  • Tarun
    Katalon Apprentice
    09/14/2018
    kazurayam said:
    09-13-2018 04:44:14 PM - [INFO]   - Web element found by heuristic method is not used because we can't guarantee it reflects the intended element.

    This seems to be a duplicate as this:

    https://forum.katalon.com/discussion/9004/issue-with-webui-waitforelementpresent-and-webui-waitforelementvisible-in-katalon-5-6

    may be a bug in Katalon?

    Upvote
    Quote
  • Tarun
    Katalon Apprentice
    09/14/2018
    I guess the root cause why katalon unable to find text box is mentioned in this thread

    https://forum.katalon.com/discussion/9659/element-found-in-developer-tools-but-no-in-css-xpath-checker?new=1
    Upvote
    Quote
  • kazurayam
    Katalon Evangelist
    09/15/2018
    edited September 15
    Katalon document 'Manage Test Object', section titled 'Manage Parent Object' shows an example how to tell a Test Object to switch context into parent iframe. 


    Tarun,

    I noticed, in the screenshot you attached, that your Test Object 'Object Repository/Page_Create Your  Account/input_First Name_firstname' does not have Parent iframe specified.

    Why not you try specifying Parent iframe for the Test Object?
    Upvote
    Quote
  • Tarun
    Katalon Apprentice
    09/15/2018
    tried that as well ,again unable to find object

    Here is screenshot from other thread as this thread not allowing for any more screenshots
    https://forum.katalon.com/discussion/9668/uploading-screenshots-for-other-thread-which-is-long-going?new=1 ;

    09-15-2018 09:33:17 AM - [START]  - Start Test Case : Test Cases/AccCreateCoppaAccount/AccCreateCoppaAccount
    09-15-2018 09:33:17 AM - [INFO]   - Evaluating variables for test case
    09-15-2018 09:33:17 AM - [START]  - Start action : openBrowser
    09-15-2018 09:33:18 AM - [INFO]   - Opening browser
    09-15-2018 09:33:18 AM - [INFO]   - Starting 'Chrome' driver
    09-15-2018 09:33:18 AM - [INFO]   - Action delay is set to 0 seconds
    Starting ChromeDriver 2.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73) on port 13946
    Only local connections are allowed.
    Sep 15, 2018 9:33:21 AM org.openqa.selenium.remote.ProtocolHandshake createSession
    INFO: Detected dialect: OSS
    09-15-2018 09:33:21 AM - [RUN_DATA] - Logging run data 'sessionId' with value 'aa93fd60980bf72f61c62f7f8f424ed9'
    09-15-2018 09:33:21 AM - [RUN_DATA] - Logging run data 'browser' with value 'Chrome 68.0.3440.106'
    09-15-2018 09:33:21 AM - [RUN_DATA] - Logging run data 'platform' with value 'Windows 10'
    09-15-2018 09:33:21 AM - [RUN_DATA] - Logging run data 'seleniumVersion' with value '3.7.1'
    09-15-2018 09:33:21 AM - [RUN_DATA] - Logging run data 'proxyInformation' with value 'ProxyInformation{proxyOption=NO_PROXY, proxyServerType=HTTP, password=, proxyServerAddress=, proxyServerPort=0}'
    09-15-2018 09:33:21 AM - [PASSED] - Browser is opened with url: ''
    09-15-2018 09:33:21 AM - [END]    - End action : openBrowser
    09-15-2018 09:33:21 AM - [START]  - Start action : navigateToUrl
    09-15-2018 09:33:21 AM - [INFO]   - Checking url
    09-15-2018 09:33:21 AM - [INFO]   - Navigating to 'https://webr12accounts.wizards.com/'
    09-15-2018 09:33:23 AM - [PASSED] - Navigate to 'https://webr12accounts.wizards.com/' successfully
    09-15-2018 09:33:23 AM - [END]    - End action : navigateToUrl
    09-15-2018 09:33:23 AM - [START]  - Start action : click
    09-15-2018 09:33:23 AM - [INFO]   - Finding Test Object with id 'Object Repository/Page_Create Your Wizards Account/button_Create Account'
    09-15-2018 09:33:23 AM - [INFO]   - Checking object
    09-15-2018 09:33:23 AM - [INFO]   - Checking timeout
    09-15-2018 09:33:23 AM - [INFO]   - Finding web element with id: 'Object Repository/Page_Create Your Wizards Account/button_Create Account' located by 'By.xpath: //button[@id='join']' in '30' second(s)
    09-15-2018 09:33:23 AM - [INFO]   - Found 1 web elements with id: 'Object Repository/Page_Create Your Wizards Account/button_Create Account' located by 'By.xpath: //button[@id='join']' in '30' second(s)
    09-15-2018 09:33:23 AM - [INFO]   - Clicking on object: 'Object Repository/Page_Create Your Wizards Account/button_Create Account'
    09-15-2018 09:33:23 AM - [PASSED] - Object: 'Object Repository/Page_Create Your Wizards Account/button_Create Account' is clicked on
    09-15-2018 09:33:23 AM - [END]    - End action : click
    09-15-2018 09:33:23 AM - [START]  - Start action : switchToFrame
    09-15-2018 09:33:23 AM - [INFO]   - Finding Test Object with id 'Object Repository/Page_Create Your Wizards Account/iframe_concat(id(  wotcAccount'
    09-15-2018 09:33:23 AM - [INFO]   - Switching to iframe: 'Object Repository/Page_Create Your Wizards Account/iframe_concat(id(  wotcAccount'
    09-15-2018 09:33:23 AM - [INFO]   - Checking timeout
    09-15-2018 09:33:23 AM - [WARNING] - Timeout '0' is invalid. Using default page load timeout: '30'
    09-15-2018 09:33:23 AM - [INFO]   - Finding web element with id: 'Object Repository/Page_Create Your Wizards Account/iframe_concat(id(  wotcAccount' located by 'By.xpath: //iframe[@id='wotcAccountWidgetModalIframe']' in '30' second(s)
    09-15-2018 09:33:23 AM - [INFO]   - Found 1 web elements with id: 'Object Repository/Page_Create Your Wizards Account/iframe_concat(id(  wotcAccount' located by 'By.xpath: //iframe[@id='wotcAccountWidgetModalIframe']' in '30' second(s)
    09-15-2018 09:33:23 AM - [INFO]   - Switched to iframe: 'Object Repository/Page_Create Your Wizards Account/iframe_concat(id(  wotcAccount'
    09-15-2018 09:33:23 AM - [END]    - End action : switchToFrame
    09-15-2018 09:33:23 AM - [START]  - Start action : setText
    09-15-2018 09:33:23 AM - [INFO]   - Finding Test Object with id 'Object Repository/Page_Create Your Wizards Account/firstname'
    09-15-2018 09:33:23 AM - [INFO]   - Finding Test Object with id 'Object Repository/Page_Create Your Wizards Account/iframe'
    09-15-2018 09:33:23 AM - [INFO]   - Checking object
    09-15-2018 09:33:23 AM - [INFO]   - Checking text
    09-15-2018 09:33:23 AM - [INFO]   - Object: 'Object Repository/Page_Create Your Wizards Account/firstname' has parent object(s)
    09-15-2018 09:33:23 AM - [INFO]   - Switching to iframe: 'Object Repository/Page_Create Your Wizards Account/iframe'
    09-15-2018 09:33:23 AM - [INFO]   - Checking timeout
    09-15-2018 09:33:23 AM - [INFO]   - Finding web element with id: 'Object Repository/Page_Create Your Wizards Account/iframe' located by 'By.xpath: ' in '30' second(s)
    09-15-2018 09:33:54 AM - [INFO]   - Found web element with id: 'Object Repository/Page_Create Your Wizards Account/iframe' using heuristic method. Matching attributes: [xpath].
    09-15-2018 09:33:54 AM - [INFO]   - Web element found by heuristic method is not used because we can't guarantee it reflects the intended element.
    09-15-2018 09:33:54 AM - [INFO]   - You should consult our guide in choosing attributes : https://docs.katalon.com/x/fhlO
    09-15-2018 09:33:54 AM - [INFO]   - Web element found by trial and error method is not used because we can't guarantee it reflects the intended element.
    09-15-2018 09:33:55 AM - [FAILED] - Unable to set text 'jjj' of object 'Object Repository/Page_Create Your Wizards Account/firstname' (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: 'Object Repository/Page_Create Your Wizards Account/iframe' located by 'By.xpath: ' not found)
    09-15-2018 09:33:55 AM - [END]    - End action : setText
    09-15-2018 09:33:55 AM - [FAILED] - Test Cases/AccCreateCoppaAccount/AccCreateCoppaAccount FAILED because (of) (Stack trace: com.kms.katalon.core.exception.StepFailedException: Unable to set text 'jjj' of object 'Object Repository/Page_Create Your Wizards Account/firstname' (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: 'Object Repository/Page_Create Your Wizards Account/iframe' located by 'By.xpath: ' not found)
     at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)
     at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)
     at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)
     at com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword.setText(SetTextKeyword.groovy:65)
     at com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword.execute(SetTextKeyword.groovy:37)
     at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)
     at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.setText(WebUiBuiltInKeywords.groovy:950)
     at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$setText$3.call(Unknown Source)
     at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
     at Script1536857306109.run(Script1536857306109.groovy:24)
     at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:183)
     at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:108)
     at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:294)
     at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:285)
     at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:264)
     at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:256)
     at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:200)
     at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:99)
     at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:90)
     at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
     at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:149)
     at TempTestCase1537029193497.run(TempTestCase1537029193497.groovy:22)
     at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263)
     at groovy.lang.GroovyShell.run(GroovyShell.java:518)
     at groovy.lang.GroovyShell.run(GroovyShell.java:507)
     at groovy.ui.GroovyMain.processOnce(GroovyMain.java:653)
     at groovy.ui.GroovyMain.run(GroovyMain.java:384)
     at groovy.ui.GroovyMain.process(GroovyMain.java:370)
     at groovy.ui.GroovyMain.processArgs(GroovyMain.java:129)
     at groovy.ui.GroovyMain.main(GroovyMain.java:109)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:498)
     at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:109)
     at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:131)
    )
    09-15-2018 09:33:55 AM - [END]    - End Test Case : Test Cases/AccCreateCoppaAccount/AccCreateCoppaAccount
    Upvote
    Quote
  • Tarun
    Katalon Apprentice
    09/15/2018
    downloaded new katalon now,still no success :(
    Upvote
    Quote
  • kazurayam
    Katalon Evangelist
    09/15/2018
    edited September 15
    The script you attached on 14/Sep has the following line:
    WebUI.switchToFrame(findTestObject(
        'Page_Create Your Wizards Account/iframe_concat(id(  wotcAccount'
        ),
        5)
    Your test object seems to be named as
    'Page_Create Your Wizards Account/iframe_concat(id(  wotcAccount'
    To me, this string looks odd. Are you sure your test object is actually named as such?
    Upvote
    Quote
  • Tarun
    Katalon Apprentice
    09/15/2018
    yeah it was named by katalon tool ,let me remove spaces and retry 
    Upvote
    Quote
  • Tarun
    Katalon Apprentice
    09/16/2018
    edited September 16
    tried after removing spaces,but seems this new katalom tool has issues with switch frame,switch frame was working fine before but that even failing now,why katalon saying "Unable to verify image" when I am just switching to iframe,I guess I amloosing the hope of implementing katalon  in my project :(  tried really day and night ,almost didn't slept overnight 

    09-15-2018 04:52:35 PM - [START]  - Start Test Case : Test Cases/AccCreateCoppaAccount/AccCreateCoppaAccount
    09-15-2018 04:52:35 PM - [INFO]   - Evaluating variables for test case
    09-15-2018 04:52:35 PM - [START]  - Start action : openBrowser
    09-15-2018 04:52:35 PM - [INFO]   - Opening browser
    09-15-2018 04:52:35 PM - [INFO]   - Starting 'Chrome' driver
    09-15-2018 04:52:35 PM - [INFO]   - Action delay is set to 0 seconds
    Starting ChromeDriver 2.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73) on port 10701
    Only local connections are allowed.
    Sep 15, 2018 4:52:39 PM org.openqa.selenium.remote.ProtocolHandshake createSession
    INFO: Detected dialect: OSS
    09-15-2018 04:52:39 PM - [RUN_DATA] - Logging run data 'sessionId' with value '6ada164570c19d9b1fb4b38365b1503d'
    09-15-2018 04:52:39 PM - [RUN_DATA] - Logging run data 'browser' with value 'Chrome 68.0.3440.106'
    09-15-2018 04:52:39 PM - [RUN_DATA] - Logging run data 'platform' with value 'Windows 10'
    09-15-2018 04:52:39 PM - [RUN_DATA] - Logging run data 'seleniumVersion' with value '3.7.1'
    09-15-2018 04:52:39 PM - [RUN_DATA] - Logging run data 'proxyInformation' with value 'ProxyInformation{proxyOption=NO_PROXY, proxyServerType=HTTP, password=, proxyServerAddress=, proxyServerPort=0}'
    09-15-2018 04:52:39 PM - [PASSED] - Browser is opened with url: ''
    09-15-2018 04:52:39 PM - [END]    - End action : openBrowser
    09-15-2018 04:52:39 PM - [START]  - Start action : navigateToUrl
    09-15-2018 04:52:39 PM - [INFO]   - Checking url
    09-15-2018 04:52:39 PM - [INFO]   - Navigating to 'https://webr12accounts.com/'
    09-15-2018 04:52:40 PM - [PASSED] - Navigate to 'https://webr12accounts.com/' successfully
    09-15-2018 04:52:40 PM - [END]    - End action : navigateToUrl
    09-15-2018 04:52:40 PM - [START]  - Start action : click
    09-15-2018 04:52:40 PM - [INFO]   - Finding Test Object with id 'Object Repository/Page_Create Your Wizards Account/button_Create Account'
    09-15-2018 04:52:40 PM - [INFO]   - Checking object
    09-15-2018 04:52:40 PM - [INFO]   - Checking timeout
    09-15-2018 04:52:40 PM - [INFO]   - Finding web element with id: 'Object Repository/Page_Create Your Wizards Account/button_Create Account' located by 'By.xpath: //button[@id='join']' in '30' second(s)
    09-15-2018 04:52:40 PM - [INFO]   - Found 1 web elements with id: 'Object Repository/Page_Create Your Wizards Account/button_Create Account' located by 'By.xpath: //button[@id='join']' in '30' second(s)
    09-15-2018 04:52:40 PM - [INFO]   - Clicking on object: 'Object Repository/Page_Create Your Wizards Account/button_Create Account'
    09-15-2018 04:52:40 PM - [PASSED] - Object: 'Object Repository/Page_Create Your Wizards Account/button_Create Account' is clicked on
    09-15-2018 04:52:40 PM - [END]    - End action : click
    09-15-2018 04:52:40 PM - [START]  - Start action : switchToFrame
    09-15-2018 04:52:40 PM - [INFO]   - Finding Test Object with id 'Object Repository/Page_Create Your Wizards Account/iframe_concat(id(wotcAccount'
    09-15-2018 04:52:40 PM - [INFO]   - Switching to iframe: 'Object Repository/Page_Create Your Wizards Account/iframe_concat(id(wotcAccount'
    09-15-2018 04:52:40 PM - [INFO]   - Checking timeout
    09-15-2018 04:52:41 PM - [FAILED] - Unable to verify image 'Object Repository/Page_Create Your Wizards Account/iframe_concat(id(wotcAccount' present (Root cause: java.lang.IllegalArgumentException: Cannot find elements when the XPath expression is null.)
    09-15-2018 04:52:41 PM - [END]    - End action : switchToFrame
    09-15-2018 04:52:41 PM - [FAILED] - Test Cases/AccCreateCoppaAccount/AccCreateCoppaAccount FAILED because (of) (Stack trace: com.kms.katalon.core.exception.StepFailedException: Unable to verify image 'Object Repository/Page_Create Your Wizards Account/iframe_concat(id(wotcAccount' present (Root cause: java.lang.IllegalArgumentException: Cannot find elements when the XPath expression is null.)
     at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)
     at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)
     at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)
     at com.kms.katalon.core.webui.keyword.builtin.SwitchToFrameKeyword.switchToFrame(SwitchToFrameKeyword.groovy:84)
     at com.kms.katalon.core.webui.keyword.builtin.SwitchToFrameKeyword.execute(SwitchToFrameKeyword.groovy:68)
     at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)
     at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.switchToFrame(WebUiBuiltInKeywords.groovy:2850)
     at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$switchToFrame$2.call(Unknown Source)
     at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:141)
     at Script1536857306109.run(Script1536857306109.groovy:37)
     at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:183)
     at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:108)
     at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:294)
     at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:285)
     at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:264)
     at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:256)
     at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:200)
     at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:99)
     at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:90)
     at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
     at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:149)
     at TempTestCase1537055552897.run(TempTestCase1537055552897.groovy:22)
     at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263)
     at groovy.lang.GroovyShell.run(GroovyShell.java:518)
     at groovy.lang.GroovyShell.run(GroovyShell.java:507)
     at groovy.ui.GroovyMain.processOnce(GroovyMain.java:653)
     at groovy.ui.GroovyMain.run(GroovyMain.java:384)
     at groovy.ui.GroovyMain.process(GroovyMain.java:370)
     at groovy.ui.GroovyMain.processArgs(GroovyMain.java:129)
     at groovy.ui.GroovyMain.main(GroovyMain.java:109)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:498)
     at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:109)
     at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:131)
    )
    09-15-2018 04:52:41 PM - [END]    - End Test Case : Test Cases/AccCreateCoppaAccount/AccCreateCoppaAccount
    Upvote
    Quote
  • kazurayam
    Katalon Evangelist
    09/16/2018
    edited September 16
    09-15-2018 04:52:40 PM - [START]  - Start action : switchToFrame
    09-15-2018 04:52:40 PM - [INFO]   - Finding Test Object with id 'Object Repository/Page_Create Your Wizards Account/iframe_concat(id(wotcAccount'
    09-15-2018 04:52:40 PM - [INFO]   - Switching to iframe: 'Object Repository/Page_Create Your Wizards Account/iframe_concat(id(wotcAccount'
    09-15-2018 04:52:40 PM - [INFO]   - Checking timeout
    09-15-2018 04:52:41 PM - [FAILED] - Unable to verify image 'Object Repository/Page_Create Your Wizards Account/iframe_concat(id(wotcAccount' present (Root cause: java.lang.IllegalArgumentException: Cannot find elements when the XPath expression is null.)
    09-15-2018 04:52:41 PM - [END]    - End action : switchToFrame

    These messages indicates that the selector (xpath?) defined in the Test Object 'Object Repository/Page_Create Your Wizards Account/iframe_concat(id(wotcAccount' is wrong.

    Pls show us the selector of the test object, and HTML fragment around <iframe>.


    Upvote
    Quote
  • Tarun
    Katalon Apprentice
    09/16/2018
  • Tarun
    Katalon Apprentice
    09/16/2018
  • Tarun
    Katalon Apprentice
    09/17/2018
    thanks finally got it working by this 
    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.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.webui.driver.DriverFactory as DriverFactory
    import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords
    import internal.GlobalVariable as GlobalVariable
    import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
    import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
    import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
    import com.thoughtworks.selenium.Selenium as Selenium
    import org.openqa.selenium.firefox.FirefoxDriver as FirefoxDriver
    import org.openqa.selenium.WebDriver as WebDriver
    import com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium as WebDriverBackedSelenium
    import static org.junit.Assert.*
    import java.util.regex.Pattern as Pattern
    import static org.apache.commons.lang3.StringUtils.join
    import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
    WebUI.openBrowser('https://webr12accounts.com/')
    WebUI.maximizeWindow()
    def driver = DriverFactory.getWebDriver()
    selenium = new WebDriverBackedSelenium(driver, baseUrl)
    selenium.click('id=join')
    WebUI.switchToFrame(findTestObject('AccCreateNonCoppaAccount/iframe_wotcAccountWgbtModalIframe'), 5)
    WebUI.switchToWindowIndex(findTestObject('AccCreateNonCoppaAccount/iframe_wotcAccountWgbtModalIframe'), FailureHandling.OPTIONAL)
    WebUI.delay(4)
    WebUI.waitForPageLoad(3)
    selenium.type('id=firstname', 'sdss')
    selenium.type('id=lastname', 'test')
    selenium.click('id=dob_Year')
    selenium.select('id=dob_Year', 'label=2003')
    selenium.click('id=dob_Year')
    selenium.click('id=dob_Month')
    selenium.select('id=dob_Month', 'label=12')
    selenium.click('id=dob_Month')
    selenium.click('id=dob_Day')
    selenium.select('id=dob_Day', 'label=18')
    selenium.click('id=dob_Day')
    selenium.click('id=email')
    selenium.type('id=email', 'raymantest885@test.wigb.com')
    selenium.click('id=username')
    selenium.type('id=username', 'raymantest885')
    selenium.type('id=password', 'Password1!')
    selenium.type('id=confirmPassword', 'Password1!')
    selenium.type('id=joinCaptchaAnswer', 'TEST')
    selenium.click('id=next')
    WebUI.delay(10)
    WebUI.closeBrowser()

    Thanks a Ton for being with me  through out
    Upvote
    Quote
Sign In or Register to comment.
Not the answer you're looking for? Consider subscribing to Business support.