I am extensively using PHPUnit and selenium with the WebDriver-PHP library provided on the chibimagic.org github page. I have done well to get this automation working but I have stumbled across a problem but working around until I came to point where this problem is causing me not to be able to finish what I started automating.
If I have multiple select boxes on specific pages on a website that we test (that is actually a web application), I can only select the first select box and change its option but not the remainder select boxes that follow after it even if I am using get_element to select the correct select boxes individually, it selects only the first select box and no further. I will include the HTML page I am not able to select a select box with that is necessary for me to select in order to complete the transaction on that page.
I would like to note that this feature does work on other pages, but just certain webpages I am testing create this problem. I am not able to change the HTML code of this page because it is controlled and developed solely by another company. So changing the HTML will not be possible and I cannot see a difference between the pages where it can select multiple select boxes and where it is not able to select multiple select boxes successfully.
I use XPath, CSS and the standard selectors when using get_element and I use this for pages where they select the element with no problem, to eliminate any reason that cause you to think I am not coding it correctly. The coding is fine, the library is not doing something correctly in particular situations of HTML code.
Note: This is occurs on many pages that have multiple select boxes. Please refer the pasteit link to the samples of HTML.
The attached HTML documents: Problem sample HTMLs: CreateDriver.html - not able to select multiple select boxes (only selects the first select box) http://pastebin.com/zdhSJLh6
No problem sample HTMLs: TripScreen.html - able to select multiple select boxes http://pastebin.com/6JPAZZG3