Monday, 15 March 2010

selenium - Robot Framework selecting from UL ID and li class -


I am unable to select any ULID / Le class items. I do not see any way to deal with this. Anyone is able to do this?

  & lt; Ul id = "game_list" & gt; & Lt; Li class = "game_link" onclick = "update_blurb ('one');" & Gt; A & lt; / Li & gt; & Lt; Li class = "game_link" onclick = "update_blurb ('two');" & Gt; Two & lt; / Li & gt; & Lt; Li class = "game_link" onclick = "update_blurb ('three');" & Gt; Three & lt; / Li & gt; & Lt; Li class = "game_link" onclick = "update_blurb ('four');" & Gt; Four & lt; / Li & gt; & Lt; Li class = "game_link" onclick = "update_blurb ('five');" & Gt; Five & lt; / Li & gt; & Lt; Li class = "game_link" onclick = "update_blurb ('six');" & Gt; Six and lt; / Li & gt; & Lt; / Ul & gt;   

I'm trying to select a li class link.

I still can not believe what is the problem, the right way to click on things is you Also & lt; Li & gt; Elements can be selected by a CSS selector or XPath expression ().

For example:

  click element. CSS = # game_list & gt; Li: Clicks nth-child (3)   

third and

  • item .

    Or Text:

     Click the  element. Xpath = id ('game_list') / li [text () = 'three']   

    li & gt; selects the element whose text is "three".

  • No comments:

    Post a Comment