Ecrire dans une fenêtre HTML

Bonjour,
Je suis entrain d’apprendre à faire des tests auto avec Katalon. Le test s’arrête lorsque je lui indique d’écrire dans une fenêtre HTM
Le message d’erreur est celui ci :

Finding web element with id: ‘Object Repository/input_Caption’ located by ‘By.xpath: //input[@id = ‘Caption’ and @name = ‘Caption’ and @type = ‘text’]’ in ‘30’ second(s)

Avez vous une astuce à m’apporter ?

Merci

That is not a complete error message/Ce n’est pas un message d’erreur complet.

What is the actual complaint? Did Katalon not find the element? Can you not click on it?/
Quelle est la plainte réelle? Est-ce que Katalon n’a pas trouvé l’élément? Tu ne peux pas cliquer dessus?

Hello,
Thanks for the repons. The purpose of the test is to enter a text in an “HTML” type window

Below is the error displayed by Katalon : * Item : Click Image and * Object : impg (1)* Message : Unable to click on image (Root cause: java.lang.IllegalArgumentException: This object don't have IMAGE_FILE property, please add it)Finding Test Object with id 'Object Repository/img (1)'Checking objectbest kind  

Hello,
why are you using WebUI.clickImage() instead of WebUI.click() since as i understand you have TestObject defined using xpath?

We use “web record” to create the test. We correct the errors after the “Run”

and we are really novices, we learn on our own by practicing

Great, the test grow one step ! thx.
Item : Set text
Object input_Caption
Input : texte
Error :

Finding Test Object with id ‘Object Repository/input_Caption’
Checking object
Checking text
Checking timeout
Finding web element with id: ‘Object Repository/input_Caption’ located by ‘By.xpath: //input[@id = ‘Caption’ and @name = ‘Caption’ and @type = ‘text’]’ in ‘30’ second(s)

Karine,
please post full exception so we can read what’s going on.

Hello,

Sorry for the inconvenience, we are really new users.
I copied you the messages obtained.
Can you show me the way to find the exception?

cordially

Karin,
there are 2 places where can you find messages with valuable information from execution:
Console and Log Viewer most important records are those with [FAILED] on begining

thx,
The message in Console :

06-25-2018 10:37:12 AM - [START] - Start action : setText

06-25-2018 10:37:12 AM - [INFO] - Finding Test Object with id ‘Object Repository/input_Caption’

06-25-2018 10:37:12 AM - [INFO] - Checking object

06-25-2018 10:37:12 AM - [INFO] - Checking text

06-25-2018 10:37:12 AM - [INFO] - Checking timeout

06-25-2018 10:37:12 AM - [INFO] - Finding web element with id: ‘Object Repository/input_Caption’ located by ‘By.xpath: //input[@id = ‘Caption’ and @name = ‘Caption’ and @type = ‘text’]’ in ‘30’ second(s)

06-25-2018 10:37:44 AM - [FAILED] - Unable to set text ‘Les petits pains au chocolat sont des viennoiseries. Dans le sud, on les appelle Chocolatines.’ of object ‘Object Repository/input_Caption’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/input_Caption’ located by ‘By.xpath: //input[@id = ‘Caption’ and @name = ‘Caption’ and @type = ‘text’]’ not found)

06-25-2018 10:37:44 AM - [END] - End action : setText

06-25-2018 10:37:44 AM - [FAILED] - Test Cases/Article - Fiche FAILED because (of) Unable to set text ‘Les petits pains au chocolat sont des viennoiseries. Dans le sud, on les appelle Chocolatines.’ of object ‘Object Repository/input_Caption’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/input_Caption’ located by ‘By.xpath: //input[@id = ‘Caption’ and @name = ‘Caption’ and @type = ‘text’]’ not found)

06-25-2018 10:37:44 AM - [END] - End Test Case : Test Cases/Article - Fiche

Best kind

it seems your xpath is not valid you need to check it.
try what @kazurayam write in his response in this thread : http://forum.katalon.com/discussion/7520/the-xpath-for-the-url-is-correct-but-not-visible-if-added-via-addproperty#latest

also you can try first reduce list of parameters in xpath itself … try to use id only (this can be done in object definition by un-ticking name and type)

1 Like

Great, the cursor is correctly in the window but we still can not write in this entry form

below the exception

06-25-2018 02:01:08 PM - [START] - Start action : setText

06-25-2018 02:01:08 PM - [INFO] - Finding Test Object with id ‘Object Repository/input_Caption’

06-25-2018 02:01:08 PM - [INFO] - Checking object

06-25-2018 02:01:08 PM - [INFO] - Checking text

06-25-2018 02:01:08 PM - [INFO] - Checking timeout

06-25-2018 02:01:08 PM - [INFO] - Finding web element with id: ‘Object Repository/input_Caption’ located by ‘By.xpath: //input[@id = ‘Caption’ and @name = ‘Caption’ and @type = ‘text’]’ in ‘30’ second(s)

06-25-2018 02:01:40 PM - [FAILED] - Unable to set text ‘Les petits pains au chocolat sont des viennoiseries. Dans le sud, on les appelle Chocolatines.’ of object ‘Object Repository/input_Caption’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/input_Caption’ located by ‘By.xpath: //input[@id = ‘Caption’ and @name = ‘Caption’ and @type = ‘text’]’ not found)

06-25-2018 02:01:40 PM - [END] - End action : setText

06-25-2018 02:01:40 PM - [FAILED] - Test Cases/Article - Fiche FAILED because (of) Unable to set text ‘Les petits pains au chocolat sont des viennoiseries. Dans le sud, on les appelle Chocolatines.’ of object ‘Object Repository/input_Caption’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/input_Caption’ located by ‘By.xpath: //input[@id = ‘Caption’ and @name = ‘Caption’ and @type = ‘text’]’ not found)

06-25-2018 02:01:40 PM - [END] - End Test Case : Test Cases/Article - Fiche

Try this setting:

image.png

thank you for the answer

Below the error after applying your correction

I put Delay 30 'and it did not change anything :

06-25-2018 03:48:45 PM - [START] - Start action : setText

06-25-2018 03:48:45 PM - [INFO] - Finding Test Object with id ‘Object Repository/input_Caption’

06-25-2018 03:48:45 PM - [INFO] - Checking object

06-25-2018 03:48:45 PM - [INFO] - Checking text

06-25-2018 03:48:45 PM - [INFO] - Checking timeout

06-25-2018 03:48:45 PM - [INFO] - Finding web element with id: ‘Object Repository/input_Caption’ located by ‘By.cssSelector: #Caption’ in ‘30’ second(s)

is that in popup windw? if yes. try command focus and as parameter use ‘Object Repository/input_Caption’

KARINE1506 said:

thank you for the answer

Below the error after applying your correction

I put Delay 30 'and it did not change anything :

06-25-2018 03:48:45 PM - [START] - Start action : setText

06-25-2018 03:48:45 PM - [INFO] - Finding Test Object with id ‘Object Repository/input_Caption’

06-25-2018 03:48:45 PM - [INFO] - Checking object

06-25-2018 03:48:45 PM - [INFO] - Checking text

06-25-2018 03:48:45 PM - [INFO] - Checking timeout

06-25-2018 03:48:45 PM - [INFO] - Finding web element with id: ‘Object Repository/input_Caption’ located by ‘By.cssSelector: #Caption’ in ‘30’ second(s)

That is not an error.

thx

My exception is :

06-25-2018 04:39:35 PM - [INFO] - Finding web element with id: ‘Object Repository/input_Caption’ located by ‘By.cssSelector: #Caption’ in ‘30’ second(s)

06-25-2018 04:40:07 PM - [FAILED] - Unable to focus on object ‘Object Repository/input_Caption’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/input_Caption’ located by ‘By.cssSelector: #Caption’ not found)

06-25-2018 04:40:07 PM - [END] - End action : focus

06-25-2018 04:40:07 PM - [END] - End Test Case : Test Cases/Article - Fiche

06-25-2018 04:40:07 PM - [FAILED] - Test Cases/Article - Fiche FAILED because (of) Unable to focus on object ‘Object Repository/input_Caption’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/input_Caption’ located by ‘By.cssSelector: #Caption’ not found)

Is my command line correct ?

katalon2.png

is that by any chance some embeded element in it’s own i-frame? like one on this page?

my colleague says yes it’s an i-frame

Do you know how to switch the i-frame?

1. define iFrame as Test Object
2. in definition of inputCaption use parent iFrame and browse for defined iFrame

2018-06-25_17-11-25.png