robotframework / SeleniumLibrary

Web testing library for Robot Framework
Apache License 2.0
1.36k stars 751 forks source link

In Robot Selenium Library to find any web element it generates post call with elements why not element to find single web element. #1846

Open ap0087105 opened 11 months ago

ap0087105 commented 11 months ago

Hi, I am using Selenium 4.8.3 and Ride for automation scripting. My script include simple action Click Element with xpath as //*[@id='username']. In debug logs observed that it always generates post call DEBUG : http://localhost:55411/ "POST /session/53572f229897674fc9faae17fafdc243/elements

Tried using locator strategies like id:username / default:username but every time it generates similar post call with elements. Why SeleniumLibraray not generating post call with element rather that elements like : http://localhost:55411/ "POST /session/53572f229897674fc9faae17fafdc243/element

We are trying to use Healenium (Test Automation Framework which will Heal the Broken locator at runtime and continue test execution.). This enables healing if Selenium call is element, if call is elements Automatic Healing is not enabled.

emanlove commented 11 months ago

That is by design so that the library can do some post filtering on the elements it is looking for and allowing for some flexibility in the locator strategies used through the library.

At a very high level thinking of design and program management I could see a possible pathway for having it call both. But in terms of priorities and resources my immediate reaction is that this would be fairly low on the milestone list.