Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is element is visible in webpage (not just existing) until timeout, add appeared() - done #1036

Closed
kensoh opened this issue May 22, 2021 · 6 comments
Assignees
Labels

Comments

@kensoh
Copy link
Member

kensoh commented May 22, 2021

source - Telegram

@kensoh kensoh self-assigned this May 22, 2021
@kensoh kensoh added the query label May 22, 2021
@kensoh
Copy link
Member Author

kensoh commented May 22, 2021

Checking for visible() instead of present() in a webpage is rarely used. Thus there is no function to wait for timeout like exist() for present(). Below is an appeared() function which runs the visible() check until timeout of default 10 seconds.

appeared.zip

@kensoh
Copy link
Member Author

kensoh commented May 22, 2021

Users can put the tagui_global.js to tagui/src directory so all flows can access the appeared function, or put tagui_local.js to some directory so all flows in that directory can access the appeared function. Users can also add on their custom functions.

@kensoh
Copy link
Member Author

kensoh commented May 22, 2021

With the appeared() function, following works -

https://google.com
if appeared('//*[@name="q"]')
    echo works
else
    echo oops

@kensoh kensoh added feature and removed query labels May 22, 2021
@kensoh kensoh changed the title Check if something is visible in webpage (not just existing) until timeout - use this Check if something is visible in webpage (not just existing) until timeout, add appeared() - done May 22, 2021
@kensoh kensoh changed the title Check if something is visible in webpage (not just existing) until timeout, add appeared() - done Is element is visible in webpage (not just existing) until timeout, add appeared() - done May 22, 2021
@kensoh
Copy link
Member Author

kensoh commented May 22, 2021

Thought just add to TagUI standard helper functions. Since the cost is minimal, additional 2 lines of code for function definition.

Above commit implements this. You can download the latest copy of TagUI with this fix and unzip to overwrite your existing installation (please drag the folders under tagui\src to overwrite your existing installation) - https://github.com/kelaberetiv/TagUI/archive/master.zip

In the next release, this will become part of the packaged zip files.

@marcelocecin
Copy link

it works
thanks @kensoh

@kensoh
Copy link
Member Author

kensoh commented Jun 18, 2021

Closing issue, change included in latest packaged release - https://github.com/kelaberetiv/TagUI/releases/tag/v6.46.0

@kensoh kensoh closed this as completed Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants