Check if link is avaliable in watir-webdriver - watir-webdriver

I'd like to check if a link is available for clicking ,
I've tried with
my_link.exist?
my_link.present
but they both return "true" even tho the link is not clickable (grayed)
Any idea how can i check this ?

Element#present? should do the job. It checks if the element exists and is visible on the page. You could also try Element#visible?
By the way, next time please also include relevant HTML.

Related

My sitecore page is redirecting to a 404 page, but it exists in preview and is also verified as published

I have a single page which I built from the same blocks as other pages in the same category, which do work. This page redirects to the 404 page.
I checked to make sure the page was published- it is.
I am able to preview the page in the Experience area and it looks good.
From what I can tell, no other 301s have been set up to override this.
What else can I check?
Try Checking your log files. There are additional information about what is happening.
There were dependencies that were on the page that no longer existed. Apparently, whoever cloned the page used an older (previously working) page, which no longer worked.
The specific element in question was an object reference to an image in a gallery.
We removed the element in the editor, published the page, and it worked great.

How to mention another user on Confluence through the REST API?

I am trying to insert a mention in a confluence page through the REST API.
I tried placing the [~xxxx] in the middle of the content but it doesn't seem to work. When I open the page I see [~xxxx] instead of a link to the mentioned user.
I placed that string in the body>storage>value
I have tried also with <ri:user ri:userkey="xxuserkeyxxx"/> but, in this case, I do not see anything on the page.
Any ideas?
Thanks a lot.
Found the reason why wasn't working, it needs to be:
<ac:link><ri:user ri:userkey="xxuserkeyxxx"/></ac:link>
I was missing the ac:link tag. After adding it, works fine. I wasn't able to find it on the official doc: https://confluence.atlassian.com/doc/confluence-storage-format-790796544.html
You need to use a link with the content being the user's user key
<ac:link><ri:user ri:userkey="f081435773s808c3014357744847024c" /></ac:link>
If you ever need to figure out the correct syntax for storage format:
edit a page and, in this case, #mention someone
go to the "..." menu and View Storage Format to see the result.
ri:userkey is deprecated. Instead use account-id.
<ac:link><ri:user ri:account-id=<accountId> /></ac:link>

facebook like button not showing correct information - tried debugging

We are using a facebook like button on a gallery page. When you click the like button, the parent page information is provided instead of the "item" information - but when the link is shared individually on facebook, it pulls the right information.
I tried using Facebook's debug tool, and it pulls the correct information.. the issue seems to be when its on the page. I've checked the meta info and it all looks right...
Any ideas?
https://developers.facebook.com/docs/reference/plugins/like/
Put in the correct sub-link and generate the like button again > Test it first, directly in the like button generator.
If the data is shown correctly in the debugger, then i am pretty sure the problem is that you don´t use the correct/same link in the like button. It would be important to see your usage of the like button. It´s possible that you have an escape character problem, so only the basic link is used.

Share anchor links

I want to make a button that shares links in this form:
http://example.com/#anchor
but when i click it, it shares only
http://example.com
How could I make it share what I want?
This is very simple; your URL string you want to share should be like this: http://www.domain.com/hello.html%23myanchor
The %23 will be transformed by Facebook into a #.
Your question is not very detailed and it's not easy to understand exactly what it is you're asking for..
Since the share functionaliy was deprecated I assume that you are talking about the Like button.
As you can see in that page you can put what ever url you want into the "URL to Like" field, then click the "Get Code" button and use that code in your page.
You can put the code in any page, so if your page is: "example.com/#anchor" you can still have the button like "http://example.com" or the other way around.
If however you want the user to like "example.com/#anchor" but when someone clicks on the liked link he will get to "example.com" then it's not possible.
I just thought about this (because I have the same problem).
My idea is to share a php link with a variable, let's call it 'a' for anchor, which is the anchor without # so that facebook won't remore it.
Thus you share the link:
http://www.mywebpa.ge/?a=anchor1
Then you just have to recover the value of 'a' with php and add a little script which makes you go to the anchor.
I hope it will help you.
Regards

App name showing incorrectly on the ticker

We have an old name for the app and we want the app to show the correct name on the ticker but we have not been able to do it (it is still showing the old name). We updated the title of the url canvas and submitted it on the debugger and interestingly enough, the title is taken correctly on the https address (it is shown on the debugger page but not in the ticker) but not on the http url. Actually it says for the http that the app has problems with the meta tags. Any idea on how to fix this problem? Thanks a Lot, Gilmer
Go to http://developers.facebook.com/tools/debug
Enter your url in that and try to generate all the information.
If that is not showing any errors in that, then scroll down at the end of the page.
You will find block named as "URLs"
Click on the first link named as: "Graph API:".
This will solve your issue.
In future, if you are going to change any content from your page, then don't forget to do the same process once again.
Thanks!