How to check the existence of one tag element

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
Chipuca
Posts: 10
Joined: Wed Jul 24, 2019 9:32 pm

How to check the existence of one tag element

Post by Chipuca » Thu Aug 01, 2019 7:53 pm

I just want to check if this span exist using imacros (or javascript) so i can check the tag exists, some way to check the existence of this tag.

Code: Select all

<span data-bind="visible: !Show()" class="glyphicon glyphicon-remove negative-color" style="">::before</span>
I only want to check the existence of the tag or icon, reference here https://www.w3schools.com/code/tryit.as ... L2611AZZDX

Sometimes the page doesnt display the tag, so how i can check this. the reference is just an example.
Last edited by Chipuca on Fri Aug 02, 2019 12:31 am, edited 8 times in total.
chivracq
Posts: 9507
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: How to check the existence of one span element or his value

Post by chivracq » Thu Aug 01, 2019 8:25 pm

Chipuca wrote:
Thu Aug 01, 2019 7:53 pm
I just want to check if this span exist using imacros (or javascript) or extract the ::before text so i can check exists, some way to check the existence of this span or get his value.

Code: Select all

<span data-bind="visible: !Show()" class="glyphicon glyphicon-remove negative-color" style=""><div>::before</div></span>
Thanks for sharing this "very enlightening" 'How-To'... 8)

But you didn't understand my (a bit cynical) Reply in your previous Thread/Post about reading the Forum Rules...! :roll:
+ Following up on your previous Threads... (And a deleted "Joke" doesn't count as Follow-up...)

You can keep asking Qt's and opening new Threads, but I'm "afraid" nobody is going to try to help you if you don't improve a bit the "Quality" of your Threads..., and that starts by reading the Forum Rules... :idea:
This is a Technical Forum, not a Chat-Forum for "I broke my Barbie Doll, I want a free Hug...!?" :cry: :? :cry:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Chipuca
Posts: 10
Joined: Wed Jul 24, 2019 9:32 pm

Re: How to check the existence of one span element or his value

Post by Chipuca » Thu Aug 01, 2019 8:36 pm

Like you say little padawan i check your answers so well and in the old thread was useful solving the problem with the weak of memory so i appreciate your help. I just checked and still in my mind is no idea how to figure out this. Trying to ask the questions the better possible i can.
chivracq
Posts: 9507
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: How to check the existence of one span element or his value

Post by chivracq » Thu Aug 01, 2019 8:46 pm

Chipuca wrote:
Thu Aug 01, 2019 8:36 pm
Like you say little padawan i check your answers so well and in the old thread was useful solving the problem with the weak of memory so i appreciate your help. I just checked and still in my mind is no idea how to figure out this. Trying to ask the questions the better possible i can.
Yeah well, then "let the Force be with you" by reading the Forum Rules (and applying them!!) if you want any "Jedi" to train you...! :wink:
=> The Red Box at the Top of every single Thread on this Forum..., and especially Item Nb_4 about the "CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST" Link/Page... :roll:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
chivracq
Posts: 9507
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: How to check the existence of one tag element

Post by chivracq » Fri Aug 02, 2019 8:30 pm

OK, some "good" or "bad" News, I'm not sure, you'll decide @OP..., but I give up...: :D

Getting myself a bit "fed up and frustrated" at "how complicated it seems to be to read some simple Forum Rules (that apply to all Tech Forums on Internet) and to mention 3 Version Numbers about your Environment", (+ to add a Question Mark to your Thread Title), I honestly don't get it... :shock:
And the whole "Process" is simply taking a bit too long for me :roll: , I was still trying to be "nice", but it doesn't work for me, I don't have the "Patience"... :oops:
I prefer to help Users who can "concentrate" for 30 Sec and really get stuck after they've really tried their best to find a Solution by themselves...

Alright, good luck further anyway @OP... :wink:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply