How to click on a button with dynamic text as value

Asked by libin

Hi,

  I am working on automating a web application with Silkuli. As per my test case i need to input some parameters in various control in a web page. Upon filling the input parameters it generate a button with value derived based on the input entered in other controls in the same web page.

<button class="lsb" value="123456" aria-label="Loan Search" name="btnG" type="submit">

In the above html tag 'Value' & 'aria-label' are derived fields based on the input entered in other controls.How do i click on an image with dynamically changing properties using Silkuli?I cannot use click methods directly as value displayed on the button is changing dynamically and find image failes.What is the best way to handle such situation with Silkuli?

Thanks & Regards
Libin Sebastian

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
masuo (masuo-ohara) said :
#1

Are you using Sikuli from Sikuli-IDE(Python)?
When you automate the web application and you can identify operating point by object name,
I think that is a good way to call the Selenium-WebDriver API from Sikulix-IDE.

Revision history for this message
libin (sonashetty55) said :
#2

i have used the example of a web button to explain the question in an understandable way.I am automating flash controls embedded in a JSP page using Silkuli Java api integrated with IBM RFT. I was wondering if there are any ways to handle controls having dynamically changing properties through silkuli.

Revision history for this message
masuo (masuo-ohara) said :
#3

I think the answer is in the following question.
(Please be careful because it is two years ago question .)
https://answers.launchpad.net/sikuli/+question/223428

[RaiMan said :]
Sikuli is just WYSIWYS; What You See is What You Script. Sikuli only deals with visual stuff an app produces on the real screen and has no knowledge about any app internals.
try to find the given image on the screen in this moment - not found = fail, found = pass
Sikuli internally uses Tesseract (currently 2.04) and has some possibilities to find a given text or read (OCR) the text in a region

Can you help with this problem?

Provide an answer of your own, or ask libin for more information if necessary.

To post a message you must log in.