First of all let me apologise if I've posted this in the wrong forum; I wasn't sure where it really fits.
I'm writing a script for selenium to do some tests on my website, and I've run into a problem with a few trick comboboxes. The problem is that the names of the comboboxes aren't hardcoded - they're based on an object's GUID, so the name is always memberPosition_<guid>. Fortunately, there will only be one option to select in my tests (The combobox default value is "none" and the other one is the one I want).
At the moment I've tried to use the XPath "contains()" function to choose the memberPosition, but selenium can't find the element (I'm obviously not providing the right name). My current code for this bit is:
$this->selenium->click("//*[contains(name(), 'memberPosition')]");
$this->selenium->select("//*[contains(name(), 'memberPosition')]", "label=$firstPositionName");
Any idea what I'm doing wrong?

New Topic/Question
Reply


MultiQuote


|