2017-07-07 14 views
0

私は次のコードでボタンに使用することができます最高の要素のロケータを得るために助けが必要でした。xpathやその他のロケータはどのように入手できますか?

<button onclick="btnProcess($(this), 'Adding...','fa-refresh fa-spin',0);callServer('/DejavuMobile/action/UserGroupModel_AddItem/Users/Add?hfUsername=8_44&amp;ic=44&amp;hfService=', function(response){ btnProcess($(this), 'Add new item','fa-plus',1);loadContent($('#UserAddUI') ,response); });" class="btn btn-xs btn-labeled btn-info" type="button" style="padding-right:12px;padding-left:12px;margin-left:15px;margin-bottom:15px;"><span class="btn-label"><i class="fa fa-plus"></i></span>Add new Group</button> 
+0

あなたはすでに試したことを見せてください – Andersson

答えて

2

最も読みやすい1:

//button[text()='Add new Group'] 

それはクラスや他の属性を使用してパスを作成することは可能ですが、この場合はテキストで最も明確かつ簡単な方法です。

+0

このクイックレスポンスをありがとうございます。私はすぐにそれを試してみます。私は感謝します。 – Omale

+0

ようこそ。問題がある場合は躊躇しないでください。パスは任意の要件に合わせて調整できます) –

関連する問題