Danp2 / au3WebDriver

Web Driver UDF for AutoIt
MIT License
107 stars 23 forks source link

_WD_FrameListFindElement - new function #433

Closed mlipok closed 1 year ago

mlipok commented 1 year ago

Pull request

Proposed changes

New function to locate element In the interior of all frames

Checklist

Types of changes

Please check x the type of change your PR introduces:

What is the current behavior?

Locating the element can be difficult, especially if the page contains many frames, especially if the document structure is nested.

What is the new behavior?

Easy to locate desired frame that contains matched element.

Additional context

none

System under test

not related

mlipok commented 1 year ago

Further development requires to finish/merge #434 as I had some corelated changes made to _WD_LocateElement and _WD_FrameList()

mlipok commented 1 year ago

I plan to add new commit today

Danp2 commented 1 year ago

I'm wondering if there is a better name for this function, which is a wrapper for _Wd_FrameList and _WD_FindElement. There already exist several instances of _WD_GetElementBy functions that are also wrappers for _WD_FindElement. I'm just not sure that "Locate Element" accurately describes the actions being performed. 🤔

Did you consider any alternatives?

mlipok commented 1 year ago

Did you consider any alternatives?

_WD_FindElementEx ?

Danp2 commented 1 year ago

I was thinking something more like one of these --

I'm not sure that any of the above are "the one", so let's sleep on it. Ok? 😉

mlipok commented 1 year ago
  • _WD_FindElementGlobal

This one looks most accurate, for my fresh woked up mind

mlipok commented 1 year ago

but maybe _WD_FindElementInFrames because Global can be considered by somebody like it should work in all tabs, or even in entire global network called internet :)

mlipok commented 1 year ago

_WD_FindElementInFrames

my finall proposal is: _WD_FindElementInFrameList()

It strictly says that Finding Elments will be within FrameList result

mlipok commented 1 year ago

_WD_FindElementInFrames

my finall proposal is: _WD_FindElementInFrameList()

It strictly says that Finding Elments will be within FrameList result

What think about ?

Danp2 commented 1 year ago

_WD_FindElementInFrameList()

It makes more sense to me to put FrameList first because this function is essentially an extension of _WD_FrameList. What do you think about _WD_FrameListFindElement?

mlipok commented 1 year ago

_WD_FindElementInFrameList()

It makes more sense to me to put FrameList first because this function is essentially an extension of _WD_FrameList. What do you think about _WD_FrameListFindElement?

Look at: _WD_LocateElement > _WD_FrameListFindElement

Danp2 commented 1 year ago

Look at: _WD_LocateElement > _WD_FrameListFindElement

Still a couple of instances of _WD_LocateElement in wd_demo. 😉

mlipok commented 1 year ago

Still a couple of instances of _WD_LocateElement in wd_demo. 😉

yes my Eagle Eye. Fixed: demo - _WD_FrameListFindElement

mlipok commented 1 year ago

Anything more here ?

Danp2 commented 1 year ago

No, was just giving it time to settle before merging in case you identified some last minute changes.

mlipok commented 1 year ago

As for me you can merge