Closed spooning closed 9 years ago
Originally submitted to Google Code by @pekkaklarck on 18 Feb 2011
Notice that control_key_down/up are not even exposed as keywords. You are calling Selenium API directly and any possible bugs in it are direct Selenium bugs. I'm not even sure is control_key_down even supposed to work when clicking an element. Could you test this e.g. with Selenium IDE and see does it work with it?
Finally, if you are trying to open a context menu, you might want to look Open Context Menu
keyword.
Originally submitted to Google Code by roberto.... on 23 Feb 2011
Hi, just two notes: 1) these steps of the test-case presented do not work only when is used in OpenLayers web pages. In all other web pages technologies seems to not have this multi-selection problem, so the test with Selenium IDE, as suggested, is not necessary. 2) after the two elements are selected the Context menu is opened using the 'Open Context Menu' keyword, but I think that is not relevant for this problem.
Regards
Roberto
Originally submitted to Google Code by @pekkaklarck on 23 Feb 2011
First of all, if Seleniun doesn't work well with OpenLayers there isn't much SeleniumLibrary can do about it. The easiest way to test how Selenium handles some page is using the Selenium IDE. In addition to that there are two things you can try out:
1) If you are trying to select multiple items from a list (you haven't really explained your use case) you might be able to use Select From List keyword. It allows selecting multiple values in one go, but I don't know how well it works with OpenLayers components.
2) OpenLayers is JavaScript so you should be able to interact with it using Call Javascript keyword. That's quite low level and complex but you can hide the complexity into a user keyword.
Originally submitted to Google Code by roberto.... on 10 Mar 2011
I've tried the following test-case, with the same results, with Selenium IDE:
open url waitForElementPresent locator_element1 waitForElementPresent locator_element2 controlKeyDown click locator_element1 click locator_element2 contextMenu locator_element2
If I do it "by hand" there is no problem in getting the two elements selected and call the context menu in the second element. But with Selenium IDE the only element that gets selected is locator_element2.
Originally submitted to Google Code by @pekkaklarck on 10 Mar 2011
This really seems to be a Selenium issue then. If you can get this working with Selenium somehow, I'm sure you can make it work with SeleniumLibrary too. I don't know OpenLayers nor fully understand your use case so cannot help too much with this.
Based on the discussion it seems to me that there's nothing that SeleniumLibrary can do to address this issue. If that's true then this issue can be closed. What do you Roborto think?
Originally submitted to Google Code by roberto.... on 11 Mar 2011
Just to be clear and avoid misunderstandings, the test-case that I showed in my last comment and that was used with Selenium IDE it does not work at all! I cannot get both elements selected with this test-case. This only happens with OpenLayers pages. Is this also your understanding? Are you stating that this issue cannot be solved in Selenium Library? Where is the problem then?
Originally submitted to Google Code by @pekkaklarck on 11 Mar 2011
If your test doesn't work with Selenium alone then the problem is either in Selenium, in your test, in OpenLayers, or in your system.
Originally submitted to Google Code by roberto.... on 22 Mar 2011
I agree with you. The problem seems not to be in Selenium Library Close the issue.
Originally submitted to Google Code by @pekkaklarck on 22 Mar 2011
Ok, closing. Hope you were able to solve your problem somehow.
Originally submitted to Google Code by pravinbd... on 6 May 2011
Hi,
I am having same problem... Herewith I am sending my test case....any of your suggestions are very helpful for me.
<tr> <td>click</td> <td>tn_td_4091505</td> <td>click</td> </tr> <tr> <td>controlKeyDown</td> <td>tn_td_4091505</td> <td></td> </tr> <tr> <td>click</td> <td>tn_td_4091530</td> <td>click</td> </tr> <tr> <td>controlKeyUp</td> <td>tn_td_4091505</td> <td></td> </tr>
Originally submitted to Google Code by roberto.... on 6 May 2011
Hi,
from my comments above you can check that this problem seems not to be related with the Selenium Library itself since the problem also occurs using the Selenium IDE. Did you try it with Selenium IDE?
I'm currently not looking anymore into this issue since the project were I was working has finished.
Cannot help you more than this.
Sorry for that.
Regards
Roberto
Hi,
the following test-case fails when access elements in a OpenLayers page:
(open browser for url) Click Element xpath_element1 dont_wait Call Selenium Api control_key_down
Click Element xpath_element2 dont_wait Call Selenium Api control_key_up
What happens is that the invocation of the control_key_down is completely ignored and element1 is selected and them when the second element is selected the first element gets unselected.
Note that none of the keywords fails.
Setup used: jython2.5.1 robotframework-2.5.3
robotframework-ride-0.32.1 robotframework-seleniumlibrary-2.6 Python 2.6.5
Regards
Roberto