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

Streamlining API - remove show() and save(), remove visible() [done] #12

Closed
kensoh opened this issue Jun 22, 2019 · 1 comment
Closed
Labels

Comments

@kensoh
Copy link
Member

kensoh commented Jun 22, 2019

TagUI was initially designed for non-developer users. Thus it has provisions that make getting thing done as easy as possible for non-developer users. Steps like show and save are nothing more than read followed by printing out to screen or saving to text file.

Porting these steps over adds bloat to the Python API. Thus raising an issue to track and remove the redundant show() and save(). In place of t.show(), print(t.read()) or t.echo(t.read()) can be used. In place of t.save(), t.dump(t.read()) can be used.

Also, TagUI has a helper function visible() which checks webpage base on CSS rules whether a web element is visible on the page. An element can be present in the backend DOM but hidden from rendering. This helper function would be overly confusing and only adds a small benefit, since present() can be used and most users do not care of the fine line between being present in DOM but not visible. Also, for visual automation, present() and visible() means the same thing. Thus removing visible() improves clarity to standardise usage to present().

@kensoh kensoh added the feature label Jun 22, 2019
kensoh added a commit that referenced this issue Jun 22, 2019
Details at respective issues below.

#13 - Support OCR capability and regions of interests for read() and snap()

#12 - Streamlining API - remove show() and save(), remove visible()
kensoh added a commit that referenced this issue Jun 22, 2019
Details at respective issues below.

#13 - Support OCR capability and regions of interests for read() and snap()

#12 - Streamlining API - remove show() and save(), remove visible()
@kensoh kensoh changed the title Streamlining API - remove show() and save(), remove visible() Streamlining API - remove show() and save(), remove visible() [done] Jun 22, 2019
@kensoh
Copy link
Member Author

kensoh commented Jun 22, 2019

Committed. Updated readme and sample.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant