Open page to item that is not sidebar position one in Docusaurus - docusaurus

I know that by default the page will open to whatever item at sidebar position one within the doc, but is there any way to keep the positions but instead have the page open to a different item (position 3) within the doc?
I'm using the most recent version of docusaurus. Any help would be greatly appreciated!

Related

Right click on element leads to new page unable to inspect the element

I am facing a strange issue while identifying the element on one of the webpages in my application. There are links on the page and I need to click those links and perform the necessary steps.
When I right click on those links then it immediately takes me to that page, I am not able to inspect that link element. When I use inspect tool tip and mouse over any of the link then it highlights a big window where all the links are located and in the elements section nothing shows up, at least I thought I will find those links in view source. Any help is greatly appreciated.
enter image description here
just press ctrl+shift+i
to open the inspect tool , sometime website will have event listeners for right mouse click to some other tasks . IN such case you can open dev tool using this short cut

creating a horizontal menu in social engine php

I have created a menu and inserted the generic menu widget onto a newly created page. I think by default it gives a verticle menu. I have tried various css codes found on the web to change it to a horizontal menu, but upon saving and refreshing the page I am not seeing any changes.
Can anyone advise me as to how I enable my generic menu to display the navigation links horizontally instead of vertically?
If I delete the menu and insert an html widget with code and links for a horizontal menu, other items such as my mini menu and footer menu display differently.
Thank you for your time
Regards
Amanda

Drop Down Form for Date is Deformed

I use sharepoint 2010 and I get a deformed pop up menu for Date selection. Nothing fancy here. Just a simple form to enter some data with date.
Have you seen this before? I get the same effect in Chrome/Firefox latest versions.
Thank you in advance
This is a problem with your SharePoint site's CSS (or possibly with JavaScript that affects the CSS).
That big image is a spritesheet; CSS is supposed to crop the visible region so that you only see the specific sprites that are relevant to the current control.
You can pull up the developer tools with F12 and inspect the image element and its containers to see what CSS is currently applied, as well as check for any errors in the JavaScript console.
Clear your browsers cache and reload page. Delete the datetime column and create a new.

inject text from javascript to html "View source"

When I change text using JavaScript The text does not appear in the HTML "View source". Is it possible to inject information to the HTML "View source". (When I write View source I mean to While you pressing on the right mouse button in the browser you can view the source code That returns from the server)
View Source shows you only the HTML it received from the server's response. Your JS changes happen afterward.
Firebug and Chrome's debugger show you the source dynamically so you can see the DOM and HTML as it has been changed. But view source will only ever show you what the browser received from the server.
Well,
You have said it right. When you "View source" you see what was received from the server, and elements that you added dynamically using javascript do not exist there.
If you want to see elements which you added later, you can do that using Inspect element (CTRL + SHIFT + I), which will show you current html structure displayed in browser.
When you "view source" in a browser, it is opening a window and printing the source code to the current page. This text is totally static, nothing will change its contents besides manually refreshing.
If you want the HTML source you are looking at to reflect changes you make to the page, you need to use your browsers Dev Tools. Try Right Click->Inspect Element instead of Right Click->View Source
Some techniques:
In some browsers Ctrl-A to select the whole rendered page content
and, with a right click View Source of selection, gives the source as generated by
rendering scripts. (often <script> elements are gone and replaced
by the rendered content)
Augment the address bar URI by prepending view-source: to get the
original source.
Use the menu bar or right click View Source interfaces.
With these techniques and FF it is possible to get different sources for a "static" page in the rendering chronology.
Technique #1 is interesting when automated ... along the lines of:
generate a page that displays the time in seconds,
select whole page,
render the source view of the selection
repeat periodically
quasi code:
setInterval ( write Date() to page, select all, write view source of selection to page ) every second

How can I find text location with Selenium?

I'm trying to find the location of some text on a web page using Selenium.
I can use the isTextPresent function to tell me if the text occurs, but then I want to know where it actually is.
The wider problem is that I want to click on this text.
The problem is that I don't seem to be able to click on this text, which I think is in some control embedded on the page. So, it doesn't seem to be detected as a link or button or option etc. However, I need to click on it to make a selection.
Any thoughts?
Your solution xpath=//*[text()='hello'] will click the first clickable element with the text "hello" in the source code. If you want to be more specific, you can add more cases to the xpath like this
xpath=//*[#id='exampleId']//*[text()='hello']
Now this will click element with text 'hello' that's found after some element with id 'exampleId'.
Xpath is great usage and you should answers above. However, I realised, that sometimes Selenium does not allow you to click something, because it thinks the text is hidden by CSS
So far I do not have any workaround for it and instead of clicking a button I am closing completly whole browser window.
But in my case its div hidden by CSS showing actual version number of such application. So I only take a screenshot of it:
File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
File destination = new File("path/to/outputfiles/versionNumber.png");
FileUtils.copyFile(scrFile, destination);
Got it !
I don't know the answer to how to find the location,
but, the more important bit is to click on that text.
I can just use an XPath locator in the click method, like :-
Click(xpath=//*[text()="hello"])
This will click on the element that has a text value of "hello".
In my case, this is unique, so that's specific enough.
${x_axis}= Get Horizontal Position xpath=//*[text()="Log files"]
Get Horizontal Position returns the position of 'Log files' wrt the left end(X-axis length).
the position is an integer value... so can be compared easily as well.