0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

指定した文字列が含まれる親要素取得

Posted at
<ul>
    <li>
        <div class="tree_item_1">
            <span class="tree_name">
                <a herf="/hoge/test1">test1</a>            
            </span>
        </div>
        <div class="tree_item_2">
            <input class="bikou" type="text">
        </div>
    </li>
    <li>
        <div class="tree_item_1">
            <span class="tree_name">
                <a herf="/hoge/test2">test2</a>            
            </span>
        </div>
        <div class="tree_item_2">
            <input class="bikou" type="text">
        </div>
    </li>
</ul>

※編集とプレビューで表示が違う。どうすれば正しく書けるかわからない
※編集のほうが正しいので、これを使用するさいは編集モードでみる
SelenideElement ele = $(".tree_root").$$("tree_name")
.filterBy(Condition.exactTect("test1"))
.first()
.closet("li");

//表示されているか(visible?のほうがいいかも)
ele.should(Condition.exist));

ele.$(".bikou").val("test1の備考を記入");

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?