I am studying web crawling with selenium and I found some error.
This is my coding as follows.
from selenium import webdriver as wd
main_url = 'https://searchad.naver.com/'
driver = wd.Chrome(executable_path='chromedriver.exe')
and I logged in
# access main url2
main_url2 = 'https://searchad.naver.com/my-screen'
# close popup window
driver.find_element_by_css_selector('body > my-app > wrap > welcome-beginner-layer-popup > div.ly_main_pop > div.pop_top > a').click()
# main3 page access
driver.find_element_by_css_selector('.btn_area>li').click()
# click tool menu bar
driver.find_element_by_css_selector('#navbar-common-header-collapse > ul > li:nth-child(3) > a > span.ng-binding.ng-scope').click()
from the last coding(# click tool menu bar), there is a error as Error message:
Message: no such element: Unable to locate element. Both Css selector and xpath are errors.
This is the resources codes before I click the mouse on '도구' as follows.
<a class="dropdown-toggle ng-scope" ng-if="menu.items" href="" data-toggle="dropdown" role="button" aria-expanded="false"><!-- ngIf: menu.gnb != "billing" --><span ng-if="menu.gnb != "billing"" ng-bind-html="menu.translationId | translate" class="ng-binding ng-scope">도구</span><!-- end ngIf: menu.gnb != "billing" --><!-- ngIf: menu.gnb === "billing" --><span class="ico-dropdown-arrow"></span></a>
<!-- ngIf: menu.gnb != "billing" -->
<span ng-if="menu.gnb != "billing"" ng-bind-html="menu.translationId | translate" class="ng-binding ng-scope">도구</span>
After I click the menu '도구', I can find sub-menu of '키워드 도구'. This is also the codes of '키워드도구'.
<li ng-repeat="submenu in menu.items track by $index" ng-class="{ divider: submenu === "divider", disabled: submenu.disabled }" class="ng-scope"><!-- ngIf: submenu.disabled --><!-- ngIf: submenu !== "divider" && !submenu.disabled --><a ng-if="submenu !== "divider" && !submenu.disabled" data-click-logger="" data-click-id="click.tool.keyword-planner" href="/customers/668860/tool/keyword-planner" ui-sref="tool.keyword-planner(vm.getParams({customerId: customerId}, submenu.params))" ui-sref-opts="{reload: submenu.reload}" ng-bind-html="submenu.translationId | translate" class="ng-binding ng-scope">키워드 도구</a><!-- end ngIf: submenu !== "divider" && !submenu.disabled --></li>
<!-- ngIf: submenu.disabled -->
<!-- ngIf: submenu !== "divider" && !submenu.disabled -->
<a ng-if="submenu !== "divider" && !submenu.disabled" data-click-logger="" data-click-id="click.tool.keyword-planner" href="/customers/668860/tool/keyword-planner" ui-sref="tool.keyword-planner(vm.getParams({customerId: customerId}, submenu.params))" ui-sref-opts="{reload: submenu.reload}" ng-bind-html="submenu.translationId | translate" class="ng-binding ng-scope">키워드 도구</a>
