How to copy and paste while using clipboard tag? - ipaf

I am using pace automation framework .There is tag called clipboard tag. How to use clipboard to copy and paste. Is there a possibility to perform this action?

Yes it is possible to copy and paste using clipboard Tag
Example Code:
<activity id="fillFormDetails">
<input id="userNumber" value="00900700999"/>
<dblClick id="userNumber" />
<specialKeys xpath="//input[#id='userNumber']" specialChar="{control}+a"></specialKeys>
<specialKeys xpath="//input[#id='userNumber']" specialChar="{control}+c"></specialKeys>
<clipboard varName="var"></clipboard>
<input id="currentAddress" value="${var}"/>
</activity>

Related

How to use <br> instead of <br /> in CKeditor

It's 2017 and it's the age of HTML5! In HTML5, the line break is <br>, NOT <br />. But for the life of it, I can't get CKeditor to ditch <br /> in favor of <br>.
The incorrect <br />'s are giving me all sorts of problems. Among them:
Failed code validation
(In Firefox) Using JavaScript's innerHTML on a code block that was created with <br />'s, returns <br>'s instead - which messes up comparisons about changes.
I found this old forum entry about the issue (in a related program, not in CKeditor itself):
http://ckeditor.com/forums/Support/are-not-validated-W3C-validator-How-change
But the suggested fix (changing config.docType in the config file) does NOT WORK!
I tried a bunch of different docTypes's, in both the top-level config.js and in core/config.js .
In top-level config.js , I tried:
config.docType = '<!DOCTYPE html>';
In core/config.js, I tried:
docType: '<!DOCTYPE html>',
But nothing works! :(
I also tried to hunt down instances of <br /> in the multitudes of files, but didn't find any in the core part of CKeditor. I presume that the <br /> string gets created dynamically??
How can I get CKeditor to spit out <br> rather than <br /> ?
Thanks!
Yay, it took some hardcore Googling (hard to phrase the search), but I found the answer! I hope this will help others.
Simply add:
CKEDITOR.on( 'instanceReady', function( ev ) {
// Output self-closing tags the HTML5 way, like <br>
ev.editor.dataProcessor.writer.selfClosingEnd = '>';
});
What it does, from what I understand, is to wait for the core plugin "HTML Output Writer" to be loaded - and when it is, it modifies the "writer", which is a property of each editor instance. The above way applies the change to all editors, but it could also be done to individual editor instances (though I find it hard to imagine why anyone would want to do the latter.)
For more info, from the CKEditor4 documentation:
How Do I Output HTML Instead of XHTML Code Using CKEditor?
All right, CKEditor rocks! :D

Paste image URL to html text box instead of 'browsing for file'

How can I convert the following into an editable text box, with a submit button to carry out the code below?
<input type="file" name="image_file" id="image_file" onchange="fileSelectHandler()" />
The use case is that an image URL is in the memory, and just needs to be pasted for submission, instead of choosing a local file. (since the OS grabs the remote file, makes a local copy of it then passes this on)
I'm essentially tweaking this element from a nice jcrop tutorial:
http://www.script-tutorials.com/html5-image-uploader-with-jcrop/
Many thanks!

How do we set rows(rows) and columns(cols) for an editor?

How can we set rows(rows) and columns(cols) for an Tiny MCE editor in xml form values.
<field name="description"
type="editor"
label="COM_USERS_DESCRIPTION_LBL"
description="COM_USERS_DESCRIPTION_DESC"
class="inputbox"
filter="JComponentHelper::filterText"
buttons="true"
/>
If we change editor to the toogle editor area, then its looks larger. so we have to fix the cols and rows size for the editor without using the css style.
You have use Width for editor in joomla. Click here to know more....
see also this one....

Insert crlf in a Wix Text Control

This could be a silly or stupid question, but how do I enter a carriage return (crlf) in the text of a Wix Text Control?
I tried:
<Control Type="Text">
<Text>Text goes here</Text>
<Text>Another text goes here</Text>
</Control>
But of course wix says that I cannot have more than one Text element inside a control tag.
Any ideas? I'm pretty sure is something easy to do but my google foo is failing right now.
Unfortunately Windows Installer does not support line breaks in static text controls. During installation the text is automatically formatted based on control and font sizes.
However, if you really want a line break, simply use another static text control for the next line.
The answer was easier than expected and was in front of me all this time... Using CDATA is the way to do it...
So, doing a return car in a text control is just matter of enclosing the text in CDATA, for example:
<Control Type="Text">
<Text><![CDATA[
This is my text.
With a return line
]]>
</Text>
</Control>
Looks like there could be more ways to do it, but I found that one the simpler.

Customize a document_view and add a div?

This feels like a newbie question but:
I am trying to create a new page from the drop-down display menu so that I can supply a background color to the page (so end user doesn't have to go into the html and add a div). I tried adding a new (empty) div to the template but it's not working. Is this even possible?
Here is my code (my div is called "s_holder"):
<metal:field use-macro="python:here.widget('text', mode='view')">
Body text
</metal:field>
<div metal:use-macro="here/document_relateditems/macros/relatedItems">
show related items if they exist
</div>
<div tal:replace="structure provider:plone.belowcontentbody" />
</tal:main-macro>
</metal:main>
<div id="s_holder"></div><!--end s holder-->
</body>
</html>
For the part of creating the new display view: as #Auspex said, you should put the div inside the macro.
To add your display view to the drop down menu you need to edit every content type. There are two ways of doing this:
1- manually add a "types" folder in the genericsetup profile of your product and put inside one xml file per content type. Ex:
File.xml
<?xml version="1.0"?>
<object name="File"
meta_type="Factory-based Type Information with dynamic views"
i18n:domain="plone" xmlns:i18n="http://xml.zope.org/namespaces/i18n">
<property name="view_methods">
<element value="file_view"/>
<element value="myniewfantastic_view"/>
</property>
</object>
2- in the ZMI -> portal_types edit every content type to add your display view and then in the portal_setup tool export the step for types. Extract the xml definitions from the downloaded archive to your genericsetup profile (in the "types" folder) and then edit them to remove unuseful parts as above.
Sure you can do it. I'm not convinced it's a good idea :-), but you need the <div> to be inside the main_macro (your example HTML is invalid - you have a </tal:main-macro> and no start tag, but I'm assuming you just cut and pasted the last part of the template here, because that template would never display, if it was written that way.
That said, how exactly are you adding it to "the drop-down display menu"?

Resources