0

i'm using Arquillian Graphene to get an element, and i want to be sur the get this one, becaus there is a lot of element with the same class and the id is generated so i can't really use it.

So, i'm looking for something like :

@FindBy(css="input[id*='contactPerson'] and [type='text']")

PS : i can't try it for the moment, that's why i ask that question, thank you for understanding.


EDIT :

This is how my input is generated.

<input id="contactPerson:contactPerson_input" 
       name="contactPerson:contactPerson_input" 
       type="text" 
       class="ui-autocomplete-input ui-inputfield ui-widget ui-state-default ui-corner-all ui-state-hover"
       value="James Bond" role="textbox"aria-multiline="false">

Marco

e1che
  • 1,241
  • 1
  • 17
  • 34

1 Answers1

0

You can try with the following if css is snot working.

@FindBy(xpath = "//*[contains(@value,'James Bond')]")

EDIT

@FindBy(xpath = "//div[contains(@class,'ui-autocomplete-input ui-inputfield ui-widget ui-state-default ui-corner-all ui-state-hover') and contains(@type,'text')]")
HemChe
  • 2,249
  • 1
  • 21
  • 33
  • It's a good answer but i forgot to say that value is the name of the current user, so i'll match for James Bond, but not for another user. – e1che Apr 24 '13 at 09:20