0
我想使用getText函數,但它給出的錯誤。如何在紅寶石軌道上使用黃瓜getText函數
assert_equal "Comment List", find(:xpath,'//div[@id='pageContainer']/div[2]/h2').getText()
和錯誤是 -
C:/Workspace/cucumber-project/features/step_definitions/comment_steps.rb:135: sy ntax error, unexpected ')', expecting kEND ...d='pageContainer']/div[2]/h2').text^(SyntaxError)
任何人可以幫助我在這,我只是想通過的XPath與預期的文本
請問你真的行以'.'結束? – polarblau 2011-04-08 12:07:04