Danp2 / au3WebDriver

Web Driver UDF for AutoIt
MIT License
108 stars 24 forks source link

Standardization of descriptions and variable names #398

Closed Danp2 closed 2 years ago

Danp2 commented 2 years ago

See discussion that begins here -- https://github.com/Danp2/au3WebDriver/pull/396#discussion_r959694944

Danp2 commented 2 years ago

current: ; Return values .: Success - Element ID(s) returned by web driver. proposal: ; Return values .: Success - ElementID(s) returned by web driver.

I don't see how that is an improvement. It makes the header more difficult to read IMO. And don't forget that this info gets carried over to the help file as well.

or better proposal: ; $sStartElementID - [optional] ElementID of HTML node element to use as starting point

Won't repeat myself re; ElementID. Remove the word "node" and then I'm ok with this.

Danp2 commented 2 years ago

can _WD_FIndElement finds any node types ?

I believe the Webdriver will only return nodes with type equal to ELEMENT_NODE

so element and node can be used together to describe exactly what type of Node is required.

From here --

Element nodes are simply known as elements.

Also, you should note that Nodes carries a different context within the Webdriver specs. See here for further details.

Danp2 commented 2 years ago

Another issue we should address is this -- https://github.com/Danp2/au3WebDriver/blob/c69b0ea15ec27273111aff1079e05f164c9df899/wd_helper.au3#L805

IMO, the parameter $_WD_DEBUG_Calling should be renamed so that it doesn't get confused with these enums --

https://github.com/Danp2/au3WebDriver/blob/c69b0ea15ec27273111aff1079e05f164c9df899/wd_core.au3#L89-L93

mlipok commented 2 years ago

Maybe $iCallingDebugLevel ?