1

I have a below scenario: In my script, I am entering the credential and logging to the application, after login it asks for text code that is sent to the mobile device.

Currently, through code only I want to ask user to input the code and navigate to for next actions. Is there any way to do it in squish.

Note: I am automating QT desktop application that is developed in Linux.

I tried input(prompt), but it is not working.

1 Answer 1

1

You can use testInteraction API (https://doc.qt.io/squish/squish-api.html#testinteraction-functions) provided by Squish.

Example of one of the functions mentioned in the manual:

name = testInteraction.input("Type in your name and press one of buttons below.")
if name == "":
    testInteraction.warning("It's sad you don't want to share your name.")
else:
    testInteraction.information("Hello %s!" %name)
Sign up to request clarification or add additional context in comments.

2 Comments

As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
@Community, the question is asked for a very specific context, for use with a specific product. And my answer is as direct as possible - there is an API for that, here is the documentation, here is an example. It would help if this bot/AI tool would mention what seems unclear, because "it is unclear" is close to "it does not work".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.