How to change font style in Mediaroom PF application? - mediaroom

In mediaroom PF application how can we change the font. in below code
<mrml:TVLabel ID="value1" runat="server" **FontStyle="reg16"**
Foreground="argb(255,235,235,235)" Padding="rect(10,0,0,0)"
style="position: absolute; top: 45px; left: 0px; height: 88px; width: 250px;"
Text="-" >

You can't. All you can do is use the predefined fonts available already on the STB/Simulator. The full list is in the files Styles.xml and Skin.xml.
You can find the definition like this:
<!-- FONTs in the system -->
<constant name="TVReg" value="fonts/SegoeAltMRSB.ttf"/>
<constant name="TVBold" value="fonts/SegoeAltMRB.ttf"/>
<constant name="TVItalic" value="fonts/SegoeAltMRSBI.ttf"/>
<constant name="TVBoldItalic" value="fonts/SegoeAltMRBI.ttf"/>
<constant name="TVHeader" value="fonts/SegoeAltMRB.ttf"/>
And them a lot of styles like that:
<font styleName="Bold16" fontFace="#TVBold" fontSize="16"/>

Related

How to drag and drop the angular element using co-ordinates in Robot Framework

I am trying to automate this angular application using the Robot Framework.
I am trying to drag and drop the rectangle using the drag and drop by offset keyword.
The manual scenario is when I click on the middle of the rectangle and drag, it drags the arrow.The code changes to <g transform="translate(0.5,0.5)" style="visibility: visible; cursor: pointer;"> .
If I drag through the edges, the rectangle will be moveable and the code changes to <g transform=" translate(0.5,0.5)" style=" visibility: visible; cursor: move;
I would like to drag and drop the rectangle by clicking sides. All the xpaths I tried are clicking in middle and dragging the arrow.
Please if anyone knows how to write xpath using SVG, please help me out.
<svg style="width: 100%; height: 100%; display: block; min-width: 1081px; min-height: 384px;">
<g>
<g></g>
<g>
<g transform="translate(0.5,0.5)" style="visibility: visible;">
<ellipse cx="132" cy="132" rx="32" ry="32" fill="black" stroke="black" transform="translate(0,3)" opacity="0.2"></ellipse>
<ellipse cx="132" cy="132" rx="32" ry="32" fill="#f5f5f5" stroke="#f5f5f5" pointer-events="all"></ellipse>
</g>
<g style="">
<g fill="#000000" font-family="Roboto" font-weight="bold" text-anchor="middle" font-size="14px">
<text x="132" y="137">New</text>
</g>
</g>
<g transform="translate(0.5,0.5)" style="visibility: visible; cursor: move;">
<rect x="960" y="300" width="120" height="80" fill="black" stroke="black" transform="translate(0,3)" opacity="0.2"></rect>
<rect x="960" y="300" width="120" height="80" fill="#2196f3" stroke="#2196f3" pointer-events="all"></rect>
</g>
<g style="cursor: move;">
<g fill="#000000" font-family="Roboto" font-weight="bold" text-anchor="middle" font-size="14px">
<text x="1020" y="345">test</text>
</g>
</g>
</g>
<g></g>
<g></g>
</g>
</svg>
I have tried many xpaths. But none of them helping me drag the rectangle. All the xpaths I tried are clicking in between the rectangle and results in an arrow.
Some of the xpaths tried:
(//[name()='svg']///)[3]
(//[local-name()='svg']//[name()='g'])[7]//*[local-name()='rect'][1]
(//[local-name()='svg']//[name()='g'])[7]//*[local-name()='rect'][2]
Thanks in advance.
The default Selenium behavior is to click on the center of the element.
For this I would use java.awt.Robot
In Java it would be something in the lines of
Robot r = new Robot();
Point p = findElement(locator).getLocation();
r.mouseMove(p.x + someXOffsetFromTheCenter, p.y + someYOffsetFromTheCenter);
//then use Actions to drag and drop to the destination (you should determine the destination the same way as the origin - [x,y])
Actions action = new Actions(driver);
action.click().moveByOffset(x,y).release().build().perform();
//alternatively, if you can drop to the center of the destination element, you could do
action.click().moveToElement(destinationElem).release().build().perform();

vb.net Selenium Webdriver findelement

Please understand that i'm not good at english.
There is a page that contains many rect in svg
I upload this page's html source .
There is a rect like this
<rect x="1720.68" y="726.97" width="11" height="11" rx="0" ry="0" fill="#bca888" stroke="#000" stroke-width="0" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></rect>
and There is a rect like that
<rect x="1707.36" y="646.85" width="11" height="11" rx="0" ry="0" fill="#dddddd" stroke="#000" stroke-width="0" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></rect>
But These rects are in svg
<svg height="526" version="1.1" width="682" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="1478.4759521484375 577.7315063476562 317.18333435058594 197.59629821777344" preserveAspectRatio="xMidYMin meet" style="overflow: hidden; position: relative; background-color: rgb(244, 244, 244);">
I want to program that click rect filled with "#baa882 color"
I tried to findelement by CssSelector, but it's too slow to use.
(I wanna fast program that Find Element immediately.)
Moreover, There is no way to work findelement by id or tagname.
(Please let me know if there is any available method.)
How can I make a program on condition?

Is it possible to reduce the height of appbar in windows 8?

I want to make a sleek looking thin appbar. Is it possible?
Setting Height and MinHeight work for me:
XAML:
<AppBar Height="25" MinHeight="25"> ... </AppBar>
HTML/CSS:
.win-appbar.sleek {
height: 25px;
min-height: 25px;
}
<div id="sleekAppBar" data-win-control="WinJS.UI.AppBar" class="sleek"
data-win-options=""> ... </div>
Let's think about this differently.
Why keep the AppBar the same size? The reason is, your application will visually align to the rest of the Windows 8 ecosystem. I am not saying yo can't change the AppBar; I'm just saying you had better have a good reason.
How to customize the AppBar? Here's my whole blog on the topic: http://blog.jerrynixon.com/2012/10/walkthrough-windows-8-appbar-you-might.html

How do I make resizers update the item position in XUL?

I have the following code, where a button has four resizers. When I use the top left resizer for example, it button shrinks from the bottom right, as opposed to shrinking and moving so that the top left corner follows the cursor. I've looked in Mozilla's docs and on Google, and tried adding custom on mousedown event handlers to move the thing around - but to no avail. How do I make this behave correctly?
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window id="main" title="My App" width="300" height="300" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript" src="chrome://ades/content/main.js"/>
<hbox>
<stack style="padding: 0;">
<button id="b" label="Resizable" style="margin: 0;"/>
<resizer dir="topleft" style="background: red; -moz-appearance: none;"
element="b" left="0" top="0" width="5" height="5" />
<resizer dir="topright" style="background: black; -moz-appearance: none;"
element="b" right="0" top="0" width="5" height="5"/>
<resizer dir="bottomleft" style="background: black; -moz-appearance: none;"
element="b" left="0" bottom="0" width="5" height="5"/>
<resizer dir="bottomright" style="background: black; -moz-appearance: none;"
element="b" right="0" bottom="0" width="5" height="5"/>
</stack>
</hbox>
</window>
I'm not sure how to achieve what you want but if you're resizing your button it will always reposition itself in the stack (which is at the beginning of the hbox), so it will always be at the beginning of the hbox. You might try with absolute positioning but I'm not sure if that'll work either.

Formatted XUL Tab caption

Is there an easy way to have formatted tab captions in XUL? I want to have a specific part of the tab caption in bold font.
No easy way. XUL <tab>'s text is in a <label>, which doesn't give you fine-grained control over parts of the text. You'd have to replace it with a <description> which can contain HTML markup, but this is not a standard thing to do.
An easier way perhaps is to put multiple <label>'s inside the <tab>
Eg :
<tabbox>
<tabs>
<tab>
<label style="margin-right: 0px;" value="normal"/>
<label style="margin-left: 0px; font-weight: bold;" value="bold"/>
</tab>
</tabs>
</tabbox>
Of course it depends on what it's used for exactly.