[Selenium] 解決button click() 沒有反應的問題

在Selenium 中讀取版面為button 的web element 時. 叫用click() 有時會沒有反應. 其實是 Web driver 的處理問題. 在執行時, Web drive 會令其上的web element 接了click() 指令而非button 本身, 所以並不能正常運作.

若要解決的話, 可以利用sendKey(keys.RETURN) 代替click();

About C.H. Ling 262 Articles
a .net / Java developer from Hong Kong and currently located in United Kingdom. Thanks for Google because it solve many technical problems so I build this blog as return. Besides coding and trying advance technology, hiking and traveling is other favorite to me, so I will write down something what I see and what I feel during it. Happy reading!!!

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.