how can I run IntelliJ's live edit without running the entire application? - intellij-idea

If I'm working on a java application, and I want to just edit some HTML templates, I'd like to be able to see the changes I'm making in realtime. IntelliJ gives me links to launch the page in different browsers (preview output), but this doesn't perform realtime updates, so I'm not sure what value that adds over just opening the template manually. All the documentation for the Live Edit plugin appears to be under the category of debugging javascript. Following their example doesn't appear possible as the "run" is not an option in the context menu - I assume it's only for particular types of projects.
Can anyone tell me how I can get IntelliJ to provide realtime output for html editing?

As it's clearly stated in help, Live Edit is available only during a JavaScript debugging session. You can't make it work while previewing HTML page in browser. So implementing hot reload on a server end is the only solution

Related

How to generate Domino dialogboxes on traditional (non-xpages) webforms

I want to have a popup/dialogbox with an "OK" button on it that will close the dialogbox...after someone performs a task on a Domino webform. I know I used overlays in xpages before, but the current application I am maintaining was built with traditional Domino forms (lots of pass-thru HTML) and my initial attempt to build an overlay effect did not work.
I have tried using javascript code of:
var window = window.open(url, windowName, [windowFeatures]);
...but this has not been successful. No errors in debug, yet my url page does not pop up. I am hoping someone might be able to provide a snippet of what you use so I can see where I am going wrong.
The url parameter I am passing is correct, as I used an alert to show me what was going in there, but I am doing something basic wrong.
If I can answer any questions for you I can do that as well.
Thank you
The only way I know to display a dialog box in a classic Domino web application is to do just like you would on any HTML-based webpage. Either you create your own popup functionality, or you use one of the many plugins available.
When I work with classic Domino web applications, I have often added Bootstrap to it, to make things look a bit better. Then I can use either the native Bootstrap dialog boxes, or a plug-in called Bootbox.js. But there are many other ones.

Is it possible to use a textarea for a Safari extension settings?

I've made a couple small Safari extensions. For one of them, I would like to collect a set of user-entered strings (e.g., URLs or URL patterns) using a textarea in the settings screen. The only setting types offered in the documentation are one line text, check box, slider, select lists, and radio buttons. I could use a one line text field as an ugly workaround, but I'm hoping there's a better option. I've googled for hints and looked through Safari extensions in GitHub, but haven't found an example of anyone doing this yet.
Does anyone have an example of how to use a textarea for a Safari extensions setting? Is there an undocumented feature I've not been able to find? Or is there a way to trigger a custom popup window from the settings?
Thanks for any tips.
No, there is no way to build a more complex UI inside the settings dialog. What extensions typically do is add a button (checkbox, even if it's not quite the correct element) in the settings page which then launches a separate Safari page which contains the full settings UI, written in HTML.
For an example of this, install uBlock and take a look at how it launches its setting UI.

Selenium cannot click tab in magento module detail page

I'm trying to validate data using selenium version 1.0.9 in magento grid and its detail page.
First, I walked through Selenium IDE from login page to module detail page and click the tabs available there. Eventually, IDE generates PHP codes so I put the code into proper location.
Note: Here, I have clicked the two tabs so that the events get recorded into selenium IDE.
Then, I run the code from command prompt using following command:
phpunit --configuration /var/www/tests/phpunit_test.xml
I got the error (something like):
ERROR: Element //a[#id='test_tabs_form_section']/span not found.
I modified the code and tried to open the detail page before executing click to above link i.e. "test_tabs_form_section", I am getting same error.
Another strange this is if I verify any text of detail page and remove the code that calls click to module detail tabs, it is works, not sure why?
But I really want to open detail page and click to tab, get forms element values using xpath and validate the data.
Can somebody help me, please?
Any help or suggestion is highly appreciable!
Looking forward to hear from stackoverflow geeks!
Thanks
In case this helps anybody:
I found out more things work if firebug is active. This actually makes sense cause firebug will show the final DOM tree in all it's debugging screens, so it's possible selenium is now able to reconstruct the element path because firebug altered the internal DOM.
If something doesn't work with the default element selection created by Selenium IDE, try switching it over to xpath:id-relative. You're already using that in your question, so maybe you there's an even better selector or you will need to resort to using clickAt instead of click.

Why are Selenium IDE playback controls inactive? (How can I run recorded tests?)

I started learning how to use Selenium today. I have never used it before. I downloaded the Selenium IDE (1.0.10) plugin for FireFox (3.5.16). The way it's behaving is not matching up to the docs.
When I click the record button and perform actions in my browser, nothing happens in the IDE (nothing is recorded). (Actually, initially it did record, but now it doesn't) I tried restarting FireFox and that had no effect.
Also, the main controls are now inactive. I've included a screen shot to show what I mean by that. The controls remain inactive even it I click or double click on the name of a test case in the panel on the left.
And one final question -- it appears that a Selenium test case mentions Chrome in its default configuration even though the docs say you can only record tests using FireFox. Should I do anything about that?
If anyone can shed light on any of the above mysteries I would appreciate it. Thanks!
UPDATE
I restarted FireFox again and now it's recording actions, but the controls are still greyed-out as in the screenshot, so I can't play back the test.
The issue is that you are not in the HTML runner mode. The IDE has no concept of ruby or python or c# or Java. That is up to plugins which just essentially do a find an replace.
*chrome means Firefox Chrome. Something that has been around for a lot longer than Google Chrome the browser. It means use the browser chrome which removes a couple sandboxing issues.
If you want to play back the tests you can't go out of the table mode otherwise the IDE won't understand what to do. The code in the screenshot should be stored in a .rb file and that should be executed.
Let me try to unravel mysteries -
As soon as you launch the IDE it would be in recording mode. Do you see last Red button which is enabled.
IDE Tests can be executed only when in the selenese/html format (aka table format). I guess you have changed the format to ruby (I guess so), from Option > Format.
To be able to execute tests change it back to html from option > Format > HTML
Take my words, IDE is only and only for firefox

How to test File Download dialog box using cucumber/capybara

I searched around and couldn't find how to test a file download box using capybara/cucumber?
The following image asks the question much clearer.
This was similar to another question I just answered, hope it helps Anybody have idea how to test file download using cucumber?
#Millisami Capybara::NotSupportedByDriverError Fixed for me!
What i had to do is removing the #javascript tag from my cucumber test, which was included. I mean:
#search
Scenario: Recieving a file
...
instead of
#search
#javascript
Scenario: Recieving a file
...
Hope it helps :-)
The download box is a function of the browser. Capybara simulates a browser but without all the UI etc.. (e.g. it looks like a browser to your application, so using it you'd mostly skip over the whole file download UI stuff. It would look to the browser like someone did whatever they needed to in order to tell the browser where to put the file and start the download)
If you are trying to test a download box, (beyond clicks needed to start the download) you are now testing the browser, not your application. As yourself if that's part of your charter and worth your time.
To actually test the download box you are going to have to have a browser instance going, and use a tool like Firewatir/Watir or Selenium, to actually 'drive' the browser, and some other gem to actually automate up at the OS UI level (on windows we usually use autoit) in order to click things and fill in values of the browser's file download UI.