# Get the actual focused element with BrowserLibrary

**URL:** <https://forum.robotframework.org/t/get-the-actual-focused-element-with-browserlibrary/4632>\
**Category:** Robot Framework\
**Created:** [1 September 2022 18:48 UTC](https://forum.robotframework.org/t/get-the-actual-focused-element-with-browserlibrary/4632 "2022-09-01T18:48:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wassupdev](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/wassupdev/32/1741_2.png) [@wassupdev](https://forum.robotframework.org/u/wassupdev)\
**Post date:** [1 September 2022 18:48 UTC](https://forum.robotframework.org/t/get-the-actual-focused-element-with-browserlibrary/4632/1 "2022-09-01T18:48:12Z")

</div>

Every time that I press arrowDown, the focus switches to the element below the before one, so I wanna do a loop like this:  
For ${counter} IN RANGE 0 999  
${element}= Get Actual Focused Element  
${element\_text}= Get Text ${element}  
Exit For Loop If ${element\_text} == Desired Text  
Keyboard Key arrowDown ${element}

There’s any way to do that using the browserlibrary? I think that’s already possible in SeleniumLibrary

---

<div class="post-metadata">

**Author:** ![aaltat](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/aaltat/32/15_2.png) [@aaltat](https://forum.robotframework.org/u/aaltat)\
**Post date:** [2 September 2022 16:24 UTC](https://forum.robotframework.org/t/get-the-actual-focused-element-with-browserlibrary/4632/2 "2022-09-02T16:24:45Z")

</div>

Currently this is not possible out of the box, but should be relative easy to implement [[Feature] hasFocus method on element · Issue #2159 · microsoft/playwright · GitHub](https://github.com/microsoft/playwright/issues/2159#issuecomment-991185546)

Can you raise an issue so that it gets implemented
