I'm currently developing some tests using Selenium RC. I have to problem regarding selenium Xpath "OR" statement with xpath input and textareas. Getting to the point. I have designed 2 xpaths
textarea: //span[text()='{0}']/parent::*/following-sibling::*//textarea
input: //span[text()='{0}']/parent::*/following-sibling::*//input
Generally im using Selenium.Type(myXpath,"label=myValue"); and both of those xpaths works ok. Problem is when i was trying to merge them. I doesn't really make a difference to me if its an input or a textarea since both methods do exacly the same thus i tried to merge them with | (or) statement.
//span[text()='{0}']/parent::*/following-sibling::*//textarea|//input
but unfortunately it doesn't work. If the order is //textarea|//input
it matches textarea and if //input|//textarea
it matches inputs. I was trying various combinations and still nothing. Am i missing brackets or some required syntax? Thank you for all the help.