{"image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/k/kuku81kuku81/20220605/20220605115219.png","author_url":"https://blog.hatena.ne.jp/kuku81kuku81/","published":"2023-12-30 19:00:00","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkuku81kuku81.hatenablog.com%2Fentry%2F2023%2F12%2F30_Python_Selenium_how_to_get_the_parent_element\" title=\"\u3010Python Selenium\u3011\u8981\u7d20\u306e\u89aa\u8981\u7d20\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5 - Django Girls and Boys \u5099\u5fd8\u9332\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","width":"100%","title":"\u3010Python Selenium\u3011\u8981\u7d20\u306e\u89aa\u8981\u7d20\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5","categories":["Python","selenium"],"version":"1.0","description":"python\u306eselenium\u3067\u8981\u7d20\u306e\u53d6\u5f97\u3092\u3059\u308b\u5834\u5408\u306f\u3001find_element\u3001\u307e\u305f\u306ffind_elements\u3067\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002 find_element\u306e\u5834\u5408\u306f\u3001\u305f\u3068\u3048\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 element = driver.find_element(By.NAME, \"tagname\") \u3053\u306e\u3088\u3046\u306b\u3057\u3066\u53d6\u5f97\u3057\u305f\u8981\u7d20element\u304b\u3089\uff11\u968e\u5c64\u4e0a\u306e\u8981\u7d20\uff08\u89aa\u8981\u7d20\uff09\u3092\u53d6\u5f97\u3057\u305f\u3044\u3088\u3046\u306a\u5834\u5408\u304c\u3042\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002 \u305d\u306e\u3088\u3046\u306a\u5834\u5408\u306b\u306fxpath\u3092\u4f7f\u7528\u3057\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002 element.find_element(By.XPATH, \"..\") \u540c\u69d8\u306b\u3001\uff12\u968e\u5c64\u4e0a\u306e\u8981\u7d20\u3092\u53d6\u5f97\u3059\u308b\u3088\u3046\u306a\u5834\u5408\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u2026","provider_url":"https://hatena.blog","provider_name":"Hatena Blog","url":"https://kuku81kuku81.hatenablog.com/entry/2023/12/30_Python_Selenium_how_to_get_the_parent_element","blog_title":"Django Girls and Boys \u5099\u5fd8\u9332","blog_url":"https://kuku81kuku81.hatenablog.com/","height":"190","type":"rich","author_name":"kuku81kuku81"}