Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Draft saved
Draft discarded
Cancel
5
  • What happens if you try with only '//div[@class="btn"]//span'? Commented Feb 10, 2015 at 11:02
  • @MathiasMüller it seems ok when not specify the text() of span may be the quote sign case the problem? Commented Feb 10, 2015 at 11:10
  • No, but it seems those characters (Chinese?) are not supported. Commented Feb 10, 2015 at 11:12
  • hmm, but I can use the find_element_by_link_text(u'确定') like that, and yes, they are Chinese characters, weird, though. Commented Feb 10, 2015 at 11:15
  • @Louis spark idea ! I have tried this find_element_by_xpath(u'//div[@class="btn"]//span[text()="确定"]') and it worked. You should answer this problem so that I can accept it :-) Commented Feb 10, 2015 at 12:27

default

AltStyle によって変換されたページ (->オリジナル) /