how to get the X path for cucumber testing? - eclipse

I tried it by right clicking on the web page and there is no xpath icon. So how can I make visible the xpath of the web page. Please reply soon. Now I am learning on cucumber automation testing. It is very important to know how to find the xpath of the web page.

You can also use ChroPath to find xpath of an object. Chropath is an extension of chrome browser. It gives value of selected object. Can be seen in Developer tool only.

The java side of this may let me down, but is there a specific reason you need the xpath rather than the css selectors?
But answering your question, if you use chrome and right click on the element you want to find the selector for. The select inspect at the bottom of the menu. This will open the dev tools at the bottom of your browser.
Find the element you want to target, right click that (within the dev tools) then expand the copy list in the menu and select copy xpath. If you look at the screenshot you can see that I can copy the xpath of the google logo

Related

Opening Eclipse linked content from "Help Content" in plugin

I'm trying to develop an eclipse plugin (GUI) which will include a button that I want linked to some page in the Eclipse Help Content, according to some parameters chosen in the plugin (gui), so when I press it, the content opens.
I saw that help content are found on, and can be opened in a browser like way using their http://xx.xx.xx.xx/help/..(rest of path)/(my page).html .
my question is how can i get this xx.xx.xx.xx in the code or the whole path so I can need only to concatenate (my page). (what you see in red in pic).
I assume this is some field in a class that represents this server.
Thanks
what this port looks like
You normally use the Eclipse Help System to display help pages:
IWorkbenchHelpSystem helpSys = PlatformUI.getWorkbench().getHelpSystem();
helpSys.displayHelp("help context id");

Eclipse: search text in documentation pane

Is there a way to search for text in the documentation pane of Eclipse?
E.g. see the attached screenshot showing some Android SDK documentation:
and see this screenshot showing the Search menu:
I can't see how you can do a search. And Cmd F doesn't seem to do anything either.
This is basically a web browser pane. Sadly it is quite limited in functionality, you can't search within the view (and of course not within the documentation database instead of the currently shown document).
So the work around is to open the document in a complete, external browser. In this case it is easy to find the document (http://developer.android.com/reference/packages.html) but sometimes it might be annoying to find the URL as this limited web browser view doesn't even tell it to you or gives you a possibility to get it.
If it was about site search and not searching withing the page and if the site doesn't offer a site search (this one does) then of course you can use Google with a site:developer.android.com parameter; similar for other search engines.

Trigger a click on a page in the pagetree in Backend

How could I trigger in JS a click on the pageitem of TYPO3 BE pagetree by an ID of the page ?
Looking for solutions for versions 4.5 and 6.1.
The basics are described in this document (might be slightly deprecated):
http://buzz.typo3.org/people/steffen-kamper/article/backend-navigation-in-typo3-45/
For example, to open the submodule "task center" in the "user tools" module, enter this
top.TYPO3.ModuleMenu.App.showModule('user_task');
or, to change to the pagetree, this
top.TYPO3.ModuleMenu.App.showModule('web_layout');
inside the firebug console. According to the author,
The pagetree resides in top.TYPO3.Backend.NavigationContainer, the
content resides in top.TYPO3.Backend.ContentContainer.
I haven't really understood what you'd like to click on exactly. But it might get you started.
I think in real life (or in an html fragment in a page in the backend) you can set <a javascript:...> urls</a>
I am still trying to figure out the fine points of this javascript myself. I for one want to also click on a select-box in the content Iframe after clicking in the Admintools/Report submodule. The first part is this:
top.TYPO3.ModuleMenu.App.showModule('tools_txreportsM1');

Cannot see Content Type in Orchard

I am running Orchard 1.6 and have the following problem when setting up a Site of either template Blog or Core.
I go to the dashboard and go to the Content menu item on the left. There is no Content Type menu item only Content.
All training videos seem to get this straight away, what am I doing wrong?
Go to the modules (there's a link in the left menu) and enable ContentTypes feature.

Chrome view-source versus POST

When you ask Chrome to View/Source, it resubmits your URL as a GET, even if it got there in the first place as a post. Is there some way around this for those of us debugging JAX-RS services invoked from forms that can't work with GET?
Two workarounds from this page:
http://www.google.com/support/forum/p/Chrome/thread?tid=1082a452e274f6db&hl=en
Find a working View Source plugin such as "View Source With": http://members.iinet.net.au/~bertdb/ryan/ViewSourceWith/help.html
Workaround:
Open developer tools.
Turn on resource tracking
LEAVE THE TOOLS OPEN. Click on Elements.
Top half should be page. Bottom half should be source code.
Click the Submit button in the top half. Your source code should now update to the proper POSTed source.
CTRL + SHIFT + I