Python Forum
Element with locator not found - WebElement is used
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Element with locator not found - WebElement is used
#1
Very new to Robot Framework and am trying to read the elements from xpath / css

My Code
My variable declaration
${xpath_l} xpath=//*[@class='ant-layout-sider-children']/ul/li
${css_1} css:div.ant-lyout-sider > div.ant-layout-sider-children li

*** Test Cases ***
${items1}= Get WebElement ${xpath_1}


Problem

and when i execute this test file robot <testfile>.robot, I get Element with locator not found

When I open the Inspect, the text path is highlighted correctly.

I need to view all the menu items under this path.
How to view this and constantly getting this locator error.

<ul class="ant-menu ant-menu-white ant-menu-inline-collapsed ant-menu-root ant-menu-vertical" role="menu" style="height: 100%;">
<li class="ant-menu-item" role="menuitem"><i class="anticon mk-ciRdSV mtKCPE" href="normal" src="view"><svg></svg></i><span>View</span></li>
<li class="ant-menu-item ant-menu-item-selected" role="menuitem"><i class="anticon mk-ciRdSV mtKCPE" href="selected" src="Settings"><svg>

...
and there are 7 more items.


How do I fix this?
Thanks
Reply
#2
where is python involved?
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020