Closed jeshan closed 4 years ago
Hi @jeshan,
By looking at the xpath it seems like those links are inside an iframe. Can you confirm if that's true?
Unfortunately this extension doesn't support finding links inside iframes.
No, it's not part of the iframe.
There's an iframe on the page that looks like this but I don't know if it's relevant here:
<iframe src="javascript:""" id="dynamodb" tabindex="-1" style="position: absolute; width: 0px; height: 0px; border: none; left: -1000px; top: -1000px;"></iframe>
I'm trying to copy the full xpath again but strangely, Chrome is showing me it without the element ID (not sure what I did the first time):
/html/body/div[1]/div[2]/div/div/div[2]/div/div[2]/div/div[4]/div/div/div/ul[3]/li[1]/a
Maybe the extension is reading the DOM too soon and my links appear later dynamically. What do you think?
The extension reads the links each time you activate the hints, scroll the page, or resize the window, so they don't have to bee there when the page loads.
Try activating the extension and then scroll the page. The hints should update for the other links, see if they now also updates for these ones it couldn't find.
Does those links have href
attributes? Chould you copy the HTML of one of the links, please?
Your guess was right, they indeed don't have href :unamused:
Here are some examples:
<a style="cursor:pointer; padding:0">my-table</a>
<a class="gwt-Anchor" id="ddbv2-shortcut-tables-link">Tables</a>
Is it due to the a[href]
here?
Is there any downside of changing it to just a
?
That's correct.
Yes, the downside is that all the a
elements used only for fragment links (jump to a position in a page) are included and sometimes mess up the hint numbering or it looks like they can be clicked when they can't.
I'll add .gwt-Anchor
to the list of elements to find, since it seems to be part of a framework: http://www.gwtproject.org/javadoc/latest/com/google/gwt/user/client/ui/Anchor.html
I can't do anything about the other link, my-table
. Sorry.
Understood, that's what happen when people don't follow standard semantics (e.g href
) :unamused:
I've released a new version (5.1.0) which includes support for .gwt-Anchor
links. Hopefully that has improved things a bit at least.
Understood; looks reasonable now:
@KennethSundqvist I think you should reopen this. I'm seeing another page like this:
The missing links are all a[href]
e.g:
<a class="awsui-button awsui-button-variant-primary awsui-hover-child-icons" override-focus="" role="button" href="javascript:void(0)"><span awsui-button-region="text">Launch VPC Wizard</span></a>
<a class="awsui-button awsui-button-variant-normal awsui-hover-child-icons" override-focus="" role="button" href="https://us-east-2.console.aws.amazon.com/ec2/home?region=us-east-2#LaunchInstanceWizard:" target="_blank"><span awsui-button-region="text">Launch EC2 Instances</span></a>
<a href="#vpcs:" target="_top">VPCs</a>
<a href="#NatGateways:" target="_top">NAT Gateways</a>
P.S You can ignore the "see all regions" one since they don't have href
, e.g
<a class="block-link">
...
</a>
@jeshan, I can't reproduce it with the HTML from your comment. The problem must be something else above that.
It's hard for me to help you with this since I can't access this site.
If you know how to debug javascript using the chrome developer tools then it would be very helpful if you could use breakpoints in the findHints()
function to see if it finds the links and if it thinks they're visible.
Thanks for bearing with me, Kenneth.
Af first glance, I'm seeing that putting a breakpoint (where hinting works) with condition
el.text === "Subnets"
is hit,
but when I put a condition like
el.text === "Launch VPC Wizard"
,
it doesn't get hit. So, that tells me that it's not being selected in the first place.
I'm hoping I can look into this further in an hour.
I now realised that it's part of an iframe :sob: So, let's leave this issue closed.
Thanks for helping me investigate!
It usually works well elsewhere but take a look at this:
We have many shortcuts for many links but those on the left are not found. Example xpath for one that wasn't found: