How to sort without search option in python

Asked by Muthumanikandan on 2017-07-29

In my application i need to select one record from list of values.
For selecting radio button used in screen and there is no search option in screen,
In this case how can i select my particular record by using sikuli python script.

Question information

Language:
English Edit question
Status:
Expired
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2017-08-02
Last reply:
2017-08-17
Muthumanikandan (nmuthu1) said : #1

Can anyone help me with example code for the above query

dinev (ndinev) said : #2

Can you give a visual example of your question?

Muthumanikandan (nmuthu1) said : #3

I am not able to paste my screenshot here, how to paste my screenshot

dinev (ndinev) said : #4

Use one of the many free screen cast online services and pos just a link. Good example is a Jing service

Muthumanikandan (nmuthu1) said : #5

https://screencast-o-matic.com/watch/cbjV17lAYf

For screenshot use above link.

Kindly provide me working examples to select one particular record in screenshot

Manfred Hampl (m-hampl) said : #6

How do you know which line to select? What are the selection criteria?

Some ideas:
Do a searchall for the empty selection box, store the vertical and horizontal positions for the first one in variables.
Calculate the difference in vertical positions between the first and the second ones.
If you know that you have to select the n-th line, do a click on (horizonalpos1, verticalpos1 + (n-1)*verticaldiff)

Muthumanikandan (nmuthu1) said : #7

Here the selection criteria is S.no and Gate entry no, while doing manually tester knows his gate entry.

But in script i need guidance.. In my application there is no search option and it is not possible to add search box in screen(client wont accept search box there)

Your idea is one of the possible ways , can you please explain with sample code for that idea.

Manfred Hampl (m-hampl) said : #8

Sorry, it is not possible for me to provide a sample script. I do not know any details about the program that you want to control with Sikuli, and so I cannot verify whether any sample code could really work.
I do not see a chance that somebody else is able to develop such script without having access to this application.
It seems that you have to develop that yourself.

dinev (ndinev) said : #9

Ok - some more questions:

If I click within the grid - can I do CTRL+A CTRL+C to copy all in clipboard?
Does the clipboard has human readable format in this case - I mean text?
If I am in the grid does the arrow keys work moving up and down over the rows?
Can I select a single row and copy in clipboard?
How many lines are in this list .. do you need to scroll for next pages?
Does to serial number and gate ID changes - if you are doing automated tests they maybe need to be fixed?

dinev (ndinev) said : #10

Ok - some more questions:

If I click within the grid - can I do CTRL+A CTRL+C to copy all in clipboard?
Does the clipboard has human readable format in this case - I mean text?
If I am in the grid does the arrow keys work moving up and down over the rows?
Can I select a single row and copy in clipboard?
How many lines are in this list .. do you need to scroll for next pages?
Does to serial number and gate ID changes - if you are doing automated tests they maybe need to be fixed?

Muthumanikandan (nmuthu1) said : #11

Hi Dinev ,

You are asking question to me or hampl.

If you asked to me , my answers are:

arrow keys works but it will not select radio button it just go up and down

You can copy single cell value ex: gate entry alone or vendor code alone

Every time lines count will change,it was dynamic. Only one page will display in screen but it has horizondal scroll bars

Muthumanikandan (nmuthu1) said : #12

Please find the answers of your questions in comment #9

dinev (ndinev) said : #13

So based on your answers you need to do this:

1. click on the first row in the sell you want - let say gate entry
2. copy to clipboard and verify if it is the needed one
3. press down arrow to move to the cell in the next row
4. if you 2 is false go to 2 again
5. if you found your row you can either moving left with arrows to radio button and use space to select it or knowing the row to find N-th radio button to click it

Muthumanikandan (nmuthu1) said : #14

Dinev

Can you please provide code for your idea in comment #13

I

dinev (ndinev) said : #15

I do not have application under test in order to write this code. I believe you or your team can do this given the fact the skeleton of the script is provided.

Launchpad Janitor (janitor) said : #16

This question was expired because it remained in the 'Open' state without activity for the last 15 days.