Hi,
I tried below selenium/python code with partial success
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome(executable_path=r'C:\Downloadsnew\chromedriver_win32\chromedriver.exe')
driver.maximize_window()
driver.implicitly_wait(20)
driver.get("http://xxxxx:1091/ui/index.html")
elem = driver.find_element_by_id("login_inp")
elem.send_keys("Administrator")
elem = driver.find_element_by_id("password2_inp")
elem.send_keys("password")
elem.send_keys(Keys.RETURN)
elem.click()
#elem=driver.find_element_by_xpath("//ul[@class='line']")
#elem1.find_element_by_xpath(".//a[@mn-tab='buckets']").click()
elem=driver.find_element_by_xpath("//div[@class='line' and text()='buckets']").click()
Its working till open page , fill username and password and login into page.
But, now I need to click on tab called buckets on screen, for which I am trying to locate the element by XPATH but its not working. Below code is not working.
#elem=driver.find_element_by_xpath("//ul[@class='line']")
#elem1.find_element_by_xpath(".//a[@mn-tab='buckets']").click()
elem=driver.find_element_by_xpath("//div[@class='line' and text()='buckets']").click()
[/python]
when I check inspect url
<div id="headerNav">
<div class="contents">
<ul mn-pluggable-ui-tabs="" mn-tab-bar-name="adminTab">
<li mn-tab="overview" class="line currentNav" ui-sref-active="currentNav">
<a ui-sref="app.admin.overview" href="#/overview">Overview</a>
</li>
<li mn-tab="servers" class="line" ui-sref-active="currentNav">
<a class="switch_servers" ui-sref="app.admin.servers.list" href="#/servers/active">Server Nodes</a>
</li>
<li mn-tab="buckets" class="line" ui-sref-active="currentNav">
<a class="switch_buckets" ui-sref="app.admin.buckets" href="#/buckets">Data Buckets</a>
</li><li ng-show="rbac.cluster.admin.internal.all" class="line ng-scope" ui-sref-active="currentNav"><a ui-sref="app.admin.query.workbench" class="ng-binding" href="#/query/workbench">Query</a></li>
How to click that buckets ? any suggestions