Linking to a tab without using anchor - tabs

I am trying to give my tabs a direct external link, so that the page can load on a specific tab.
I find loads of examples of doing this but all use a '#tab' as the index that is added to the URL.
Can anyone tell me of a way to link directly to a tab without using a '#'?

Related

Adding href link in google sites through embedded code

There are three pages in my sites.google.com named (index.html, data.html, test.html). I created the three files using "Full Page Embed" option in Pages section. I am having issue with adding hyperlink of data.html inside index.html
I tried
Data
Data
while trying the above ways, a link automatically adding up like https://2004xxxxxx-atari-embeds.googleusercontent.com/embeds/16cb204cf3a9d4d2xxxxxxxxxxx/data.html and giving 404 error while accessing it.
I also used the direct link Data but many browsers blocking it, saying its external
Anyway to add hyperlink to the page inside the pages through embedded code itself
I am able to use target="_blank" which opening the links in new tabs but is there a way to show in the same tab (I used target="_self" but it blocking)
It sounds like Google is using frames that live in a completely different context for this full page embed feature. Since that is the case, I think you need to use absolute URLs to link to the other pages on your site from that location:
<a target=_top href="https://example.com/data.html">Data</a>
The target=_top makes the link apply to the whole window, not just in the frame.

Is there a way to make a custom about blank page?

I'm currently working on my website and I had kept some placeholder links in it without linking it to any place, once open I get to the webpage about:blank#blocked , I was wondering if I could replace the blank screen and add a custom page maybe with .htaccess
http://rhysjosmin.tk/Subpages/Ongoing%20Projects/Ongoing.html
The link
No. When clicking invalid links such as http:// the browser does not know what to do and redirects you to some browser specific error page. Your server will not get any requests relating to this action.
I would suggest you replace all placeholder links with a valid link, let's say http://rhysjosmin.tk/Subpages/Placeholder.html, and create your custom page there.

How to show completed html source on chrome?

I'm trying to take the full html source of the tab in
this page
I want to take the source of
this tab
But unfortunately, the html I'm getting is not completed.
I registered a gif to explain it better
That select list is showing just when I inspect the element, while If I just insect the element with the list closed, it doesn't return any list html.. is it created dinamically when the user click on it?
I've tried to expand all the codes, but unfortunately it seems the html of every list is not appearing.. It might be created just when I open the list?
Is there a way to get the lists html?
Hope I've been clear.
Not sure what you want to save, but by inspecting it sources, it seems that the website use the way of removing and appending the html source which means only you pressed the expanded button, Javascript will append it (different options) to the body, otherwise it will not shown in the element tab.
I don't think you could get all html tags in just 1 try because the website use Javascript to append the html and you can't see it in the element section in console when the element is being removed.
Example:
You can save the page if you want. Just save it with Ctrl+S and you will find the basic source in there along with the stylesheet and other scripts.

How to click on a link in an iFrame in selenium IDE

Hello Stackoverflow community,
I am working with selenium IDE and I have the following problem:
I have to move a web content within a web content Management System from one folder to another. Therefore I have to click on a "Select" button to specify a target folder, then an iframe opens up where I can navigate through the "tree structure" of the folders.
The original page looks like this:
original page with "Select"-button
The structure of the web content management system is as follows:
Home
-Test(=Parent Folder):
-UniqueTitle
-UniqueTitle2
Because the folder that I want to adress(UniqueTitle2) lies one hierarchy below my current folder(I am in UniqueTitle), I have to click on the parent Folder "TEST" to go one hierarchy back. This is a link to the "TEST"-folder.
iframe where you can select the target folder
The problem is that on the original page below the iframe, the same Link to the "TEST"-folder exists as a breadcrumb. So if selenium clicks on the href link, it actually clicks the link on the original page, and not the one in the iframe.
I tried the following:
to select the iframe:
storeAttribute|css=iframe.dialog-iframe-node#id|iframeIDE
selectFrame|id=${iframeID}
to click on the link:
clickAndWait|link=TEST
clickAndWait|//a[contains(#href,'https://www.companyname.com/language/projectname/manage/maintenance/web-content-management[...]folderid=465576')]
Here is a HTML Snippet of the iframe:
TEST
How can I differentiate between these two, so my script will click within the iframe?
Thank you in advance and let me know if you need more information.
you have two options:
1. don't use iframe, use div or section instead
using this approach, you have to move the code for file selection to the main page. use AJAX to populate the file list to the div. this approach is often called single page application, though you don't need to move everything to a single page, just the file selection codes.
2. set allow-origin header of your iframe to your domain name or *
you should read about how to set this HTTP header.
here are some refs
https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin
Probably duplicate of How to switch between frames in Selenium WebDriver using Java
First thing when you want to do something inside iframe is switch to it.
WebDriver.SwitchTo().Frame(WebDriver.FindElement(By.Id("iframe")));
After that you can click on element.
When you want to back you can use:
WebDriver.SwitchTo().DefaultContent();

Open URL in new window (not via Target attribute)

I am stuck with a wordpress plugin that requires me to enter a link via a pre-defined input field. The problem is that the resulting link opens in the same window and I need it to open in a new tab. I do not have access to the HTML to change the target attribute.
Is there any way to include syntax in the actual URL to have the link open in a new window/tab? Can I do it via CSS?
To be more specific - it's a gallery of images. So will have to implement this solution across ~15 elements. I can add a script to the page.
It's not possible using css
You can try javascript like this
window.open('your_page.html', '_blank');