"OrderItem is not valid target type for the orderedItem property" - html-email

We have been working on adding Google markups to our order confirmation emails. We have added all the necessary markup in templates, but "Email Markup Tester" still gives following error:
OrderItem is not valid target type for the orderedItem property.
I am sharing a screenshot of related code, and its errors: http://i.stack.imgur.com/p1eyb.png
<table itemscope itemtype="http://schema.org/Order">
<tr>
<td>
<link itemprop="orderStatus" href="http://schema.org/OrderProcessing" />
<span itemprop="merchant" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="XYZ.com"/>
</span>
</td>
</tr>
<tr>
<td>
<span itemprop="orderDate">August 10, 2016</span>
<span itemprop="orderNumber">ABC12345</span>
</td>
</tr>
<tr>
<td>
<span>Recipient</span>
<span style="color:#333333;display:block;font-style:normal">
Mr. <span itemprop="customer" itemscope itemtype="http://schema.org/Person"><span itemprop="name"> Nilesh S Ajwelkar</span></span><br/>
kfjfjkfdkj abc
<br/>lkjdfjkdfkj def<br/>
jkfdjkdfjk ghi,
AL
63288<br/>
USA
</span>
</td>
</tr>
<tr>
<td>
<meta itemprop="priceCurrency" content="USD"/>
<meta itemprop="price" content="539.00"/>
</td>
</tr>
<tr>
<td>
<span itemprop="acceptedOffer" itemscope itemtype="http://schema.org/Offer">
<span itemprop="itemOffered" itemscope itemtype="http://schema.org/Product">
<meta itemprop="name" content="ABCDEF prod"/>
</span>
<meta itemprop="price" content="45.24"/>
<meta itemprop="priceCurrency" content="USD"/>
</span>
</td>
</tr>
<tr itemprop="orderedItem" itemscope itemtype="http://schema.org/OrderItem">
<td width="80" style="vertical-align:top;padding-left: 2px;" >
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
<img itemprop="image" src="http://image_link.com/1.jpg" alt="up sale image" height="80" width="80"/>
</td>
</tr>
<tr>
<td>
<span itemprop="acceptedOffer" itemscope itemtype="http://schema.org/Offer">
<span itemprop="itemOffered" itemscope itemtype="http://schema.org/Product">
<span itemprop="name">NOT Girl with a Pearl Earring</span>
</span>
</span>
</td>
</tr>
<tr>
<td>
<span style="display:inline-block;font-weight:bold;">ITEM NUMBER</span>
<span style="display:inline-block;padding-left:5px;color:#000000;" itemprop="orderItemNumber">17760</span>
</td>
</tr>
<tr>
<td itemprop="orderQuantity">
1
</td>
</tr>
<tr style="display: block;color: #000000;padding-bottom:5px;font-size:12px;">
<td>
<span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<span itemprop="price" content="32.85"/><span itemprop="priceCurrency" content="USD" />
</span>
$32.85
</td>
</tr>
<tr>
<td>
<link itemprop="orderItemStatus" href="http://schema.org/OrderProcessing"/>
</td>
</tr>
<tr>
<td>
<span itemprop="orderDelivery" itemscope itemtype="http://schema.org/ParcelDelivery">
<span>Anticipated Arrival
<span>Aug. 15 - Aug. 18</span>
</span>
<span itemprop="trackingNumber" content=""/>
<span itemprop="trackingUrl" content=""/>
<span itemprop="expectedArrivalUntil" content="2016-18-08"/>
<span itemprop="expectedArrivalFrom" content="2016-15-08" />
</span>
</td>
</tr>
</table>
</td>
</tr>
</table>
Has anyone else faced a similar issue?

#Nilesh Ajwelker, try using itemOffered and parent type Offer.
Here's an example from the documentation:
<div itemprop="acceptedOffer" itemscope itemtype="http://schema.org/Offer">
<div itemprop="itemOffered" itemscope itemtype="http://schema.org/Product">
<meta itemprop="name" content="Samsung Chromebook"/>
<meta itemprop="sku" content="B009LL9VDG"/>
<link itemprop="url" href="http://www.amazon.com/Samsung-XE303C12-A01US-Chromebook-Wi-Fi-11-6-Inch/dp/B009LL9VDG/"/>
<link itemprop="image" href="http://ecx.images-amazon.com/images/I/81H-DO3qX0L._SX522_.jpg"/>
</div>
Digging around the documentation, it looks like orderedItem is not supported.
As stated in the link below, "A few of the schema structures used by Gmail differ from the schema.org standard vocabulary."
https://developers.google.com/gmail/markup/reference/schema-org-proposals

Related

Protractor expect specific text siblings of selector

I have a table like this:
<table>
<tbody>
...
<tr>
<td>
<div class="radio-inline">
<input name="sms_provider" type="radio" value="2" id="2">
<label class="text-gray-dark" for="2"> </label>
</div>
</td>
<td data-label="Server name">ServerA3</td>
<td data-label="Description"></td>
<td data-label="Status">
<label class="text-success">
<clr-icon shape="check"></clr-icon>
Default
</label>
</td>
<td data-label="Actions">
<a href="http://example.com/public/smsconfigurations/2/edit" data-tooltip="Edit Server">
<clr-icon shape="pencil" size="22" style="width: 22px; height: 22px;"></clr-icon>
</a>
</td>
</tr>
...
</tbody>
</table>
Now I wanna to check ServerA3 has Default status or no. As matter of fact I expect ServerA3 has Default text as siblings. What should I do?
I try with this code, but it doesn't work:
expect(element(by.xpath('//td[contains(text(), "ServerA3")]')).getWebElement().getDriver().findElement(by.css('*[data-label="status"]')).getText()).toContain('Default');
var status = element(by.xpath('//tr[td[.="ServerA3"]]/td[#data-label="Status"]'))
.getAttribute('innerText');
expect(status).toEqual('Default')

Cannot Iterate over objects in Power Shell

I have a list of buttons on a web page. I am able to get the list of buttons by using the Get Class Name function. But I am not able to iterate over it.
Here is the code:
main role="main">
<div class="wrapper">
</div>
<div class="wrapper wrapper-medium">
<header>
<h1>Unsubmitted Timesheets</h1>
<div class="clearfix">
<div class="fl-left">
<select name="" id="select-timeframe" class="hui-input"><option value="/missing_time/period/36/2018">05 Feb 2018 - 11 Feb 2018</option>
<option selected="selected" value="/missing_time/period/29/2018">This Week</option>
<option value="/missing_time/period/22/2018">22 Jan 2018 - 28 Jan 2018</option>
<option value="/missing_time/period/15/2018">15 Jan 2018 - 21 Jan 2018</option>
<option value="/missing_time/period/8/2018">08 Jan 2018 - 14 Jan 2018</option>
<option value="/missing_time/period/29/2018?all_weeks=1">- show all weeks -</option></select>
</div>
<div class="fl-right">
<button type="button" class="hui-button" data-open-dialog="email-reminder-dialog">
<i data-icon="check-green"></i>
Sending Reminder Every Friday
</button>
</div>
</div>
</header>
<section>
<form id="missing-time-form" action="/missing_time/reminders?return_to=%2Fmissing_time%2Fperiod%2F29%2F2018" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="?"><input type="hidden" name="authenticity_token" value="YmA26BT5bHy1NQKiKks+j/nKl5saFnF2fAmp/Oy6zuWANPkuuMLYTZDtdZHa/7TNh2CcUx5R2e0FsPWOxThVoQ==">
<table id="unsubmitted-timesheets" class="table">
<thead>
<tr>
<th></th>
<th>
Team Members<br>
<small>
Select:
<button type="button" class="button-link js-toggle-all-users">All</button>
/
<button type="button" class="button-link js-toggle-no-users">None</button>
</small>
</th>
<th class="text-right">Time</th>
<th></th>
</tr>
</thead>
<tbody class="has-clickable-table-rows" data-required-checkboxes="You must select at least one recipient.">
<tr class="clickable-row">
<td class="col-checkbox">
<div class="hui-checkbox">
<input name="send_reminder[1964976]" type="hidden" value="0"><input class="checkbox" aria-label="Send Reminder for Alexander Cubillos" type="checkbox" value="1" name="send_reminder[1964976]" id="send_reminder_1964976">
<label for="send_reminder_1964976"></label>
</div>
</td>
<td>
Alexander Cubillos
<span class="text-label">Contractor</span>
<label for="send_reminder_1964976" class="clickable-row-link"></label>
</td>
<td class="text-right">
24:00
<label for="send_reminder_1964976" class="clickable-row-link"></label>
</td>
<td class="col-actions">
<a class="hui-button hui-button-tiny" href="/entry/show/29/2018?of_user=1964976">View Timesheet</a>
</td>
</tr>
<tr class="clickable-row">
<td class="col-checkbox">
<div class="hui-checkbox">
<input name="send_reminder[1840318]" type="hidden" value="0"><input class="checkbox" aria-label="Send Reminder for Allain Dollete" type="checkbox" value="1" name="send_reminder[1840318]" id="send_reminder_1840318">
<label for="send_reminder_1840318"></label>
</div>
</td>
<td>
Allain Dollete
<label for="send_reminder_1840318" class="clickable-row-link"></label>
</td>
<td class="text-right">
24:30
<label for="send_reminder_1840318" class="clickable-row-link"></label>
</td>
<td class="col-actions">
<a class="hui-button hui-button-tiny" href="/entry/show/29/2018?of_user=1840318">View Timesheet</a>
</td>
</tr>
<tr class="clickable-row">
<td class="col-checkbox">
<div class="hui-checkbox">
<input name="send_reminder[1882520]" type="hidden" value="0"><input class="checkbox" aria-label="Send Reminder for Anil Khemchandani" type="checkbox" value="1" name="send_reminder[1882520]" id="send_reminder_1882520">
<label for="send_reminder_1882520"></label>
</div>
</td>
<td>
Anil Khemchandani
<span class="text-label">Contractor</span>
<label for="send_reminder_1882520" class="clickable-row-link"></label>
</td>
<td class="text-right">
0:00
<label for="send_reminder_1882520" class="clickable-row-link"></label>
</td>
<td class="col-actions">
<a class="hui-button hui-button-tiny" href="/entry/show/29/2018?of_user=1882520">View Timesheet</a>
</td>
</tr>
<tr class="clickable-row">
<td class="col-checkbox">
<div class="hui-checkbox">
<input name="send_reminder[1028098]" type="hidden" value="0"><input class="checkbox" aria-label="Send Reminder for Anna Jhaveri" type="checkbox" value="1" name="send_reminder[1028098]" id="send_reminder_1028098">
<label for="send_reminder_1028098"></label>
</div>
</td>
<td>
Anna Jhaveri
<label for="send_reminder_1028098" class="clickable-row-link"></label>
</td>
<td class="text-right">
0:00
<label for="send_reminder_1028098" class="clickable-row-link"></label>
</td>
<td class="col-actions">
<a class="hui-button hui-button-tiny" href="/entry/show/29/2018?of_user=1028098">View Timesheet</a>
</td>
</tr>
<tr class="clickable-row">
<td class="col-checkbox">
<div class="hui-checkbox">
<input name="send_reminder[1399194]" type="hidden" value="0"><input class="checkbox" aria-label="Send Reminder for Chaitanya Potluri" type="checkbox" value="1" name="send_reminder[1399194]" id="send_reminder_1399194">
<label for="send_reminder_1399194"></label>
</div>
</td>
<td>
Chaitanya Potluri
<span class="text-label">Contractor</span>
<label for="send_reminder_1399194" class="clickable-row-link"></label>
</td>
<td class="text-right">
40:00
<label for="send_reminder_1399194" class="clickable-row-link"></label>
</td>
<td class="col-actions">
<a class="hui-button hui-button-tiny" href="/entry/show/29/2018?of_user=1399194">View Timesheet</a>
</td>
</tr>
<tr class="clickable-row">
<td class="col-checkbox">
<div class="hui-checkbox">
<input name="send_reminder[1908612]" type="hidden" value="0"><input class="checkbox" aria-label="Send Reminder for Daniel Pedraza Mena" type="checkbox" value="1" name="send_reminder[1908612]" id="send_reminder_1908612">
<label for="send_reminder_1908612"></label>
</div>
</td>
<td>
I would Ideally like to click on a button got to the next page perform some action and then go back to the First Page. And then goto the next button. This action should be repeated until all the buttons are visited. I have been wracking my head around it but I have not able to come up with a solution.
I tried doing this, but it only targets the first or last button
($ie.Document.GetElementsByClassName("hui-button hui-button-tiny") |
Select-Object -First 1).Click()
($ie.Document.GetElementsByClassName("hui-button hui-button-tiny") |
Select-Object -Last 1).Click()
If I do something like this-
$ViewTimessheetObject=($ie.document.getElementsByClassName("hui-button hui-button-tiny") |Select-Object -first 1)
while($ie.Busy) { Start-Sleep -Milliseconds 100 }
($ViewTimesheetObject | ForEach-Object {$_.Click()})
It throws an error message saying that "You cannot call a method on a null-valued expression. + ($ViewTimesheetObject | ForEach-Object {$_.Click()})
Any help on this matter would be greatly appreciated.
your foreach should be for $ie.document.getElementsByClassName
($ie.document.getElementsByClassName("hui-button hui-button-tiny")) | Foreach { $_.Click()}

Vertically center input form in table Twitter Bootstrap

I can't vertically center input form in table using Twitter Bootstrap. I've found solution on the stack but it works only with plain text, doesn't work with input form (class vert-align). Do you have any suggestions?
JSFiddle
<table class="table table-striped">
<tr>
<th>
#
</th>
<th>
<i class="glyphicon glyphicon-check"></i>
</th>
<th>
Item#1
</th>
<th>
Item#2
</th>
</tr>
<div class="row">
<tr>
<div class="col-md-2">
<td class="vert-align">
1
</td>
</div>
<div class="col-md-2">
<td class="vert-align">
<input type="checkbox">
</td>
</div>
<div class="col-md-4">
<td class="vert-align">
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span><input type="text" class="form-control" placeholder="...">
</div>
</div>
</td>
</div>
<div class="col-md-4">
<td class="vert-align">
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-refresh"></i></span><input type="text" class="form-control" placeholder="...">
</div>
</div>
</td>
</div>
</tr>
</div>
<div class="row">
<tr>
<div class="col-md-2">
<td class="vert-align">
2
</td>
</div>
<div class="col-md-2">
<td class="vert-align">
<input type="checkbox">
</td>
</div>
<div class="col-md-4">
<td>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span><input type="text" class="form-control" placeholder="...">
</div>
</div>
</td>
</div>
<div class="col-md-4">
<td>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-refresh"></i></span><input type="text" class="form-control" placeholder="...">
</div>
</div>
</td>
</div>
</tr>
</div>
</table>
and css
.datepicker.dropdown-menu {
z-index: 1151;
}
.table tbody>tr>td.vert-align {
vertical-align: middle;
}

sahi and table operations

For a given table, I'd like to get the below
total number of rows
able to iterate over by row and column
using the Java Driver. I tried the option mentioned here with no luck.
Below is the HTML for table
<div id="hawkMessageCodeTable" class="ui-datatable ui-widget">
<table>
<thead>
<tr>
<th id="hawkMessageCodeTable:j_idt49" class="ui-state-default">
<div class="ui-dt-c">
<span>Code</span>
</div>
</th>
<th id="hawkMessageCodeTable:j_idt51" class="ui-state-default">
<div class="ui-dt-c">
<span>Message</span>
</div>
</th>
</tr>
</thead>
<tbody id="hawkMessageCodeTable_data" class="ui-datatable-data ui-widget-content">
<tr data-ri="0" class="ui-widget-content ui-datatable-even">
<td>
<div class="ui-dt-c">
9005
</div>
</td>
<td>
<div class="ui-dt-c">
Initial Fraud Alert on File
</div>
</td>
</tr>
<tr data-ri="1" class="ui-widget-content ui-datatable-odd">
<td>
<div class="ui-dt-c">
9003
</div>
</td>
<td>
<div class="ui-dt-c">
Security Alert or consumer statement on file relates to true name fraud or credit fraud
</div>
</td>
</tr>
<tr data-ri="2" class="ui-widget-content ui-datatable-even">
<td>
<div class="ui-dt-c">
2501
</div>
</td>
<td>
<div class="ui-dt-c">
Input/File (Current/Previous) Address Has Been Used (#) Times In The Last (30,60,90) Days On Different Inquiries
</div>
</td>
</tr>
<tr data-ri="3" class="ui-widget-content ui-datatable-odd">
<td>
<div class="ui-dt-c">
9004
</div>
</td>
<td>
<div class="ui-dt-c">
Active Duty Alert on File
</div>
</td>
</tr>
</tbody>
</table>
</div>
I have implemented a similar function with sahi for ruby. To answer your questions:
rowLen = table.fetch("rows.length").to_i
Loop through all the cells with:
#browser.cell(table,rowIndex,colIndex).exists?()
You can find the corresponding api for sahi java

overlapping of panels (ascx) in IE7

I have the problem of panel overlapping in IE7 whereas the same code works in IE8.
Has anyone faced this kind of problem?
In the code below, i have a link button, on clicking this, the products frame would be displayed. But this overlaps with the "client products" :
<%# Control Language="C#" AutoEventWireup="true" CodeFile="ClientSummary.ascx.cs" Inherits="ClientSummary" %>
<%# Register Src="~/Controls/ClientSession/CounselorMenuFrame.ascx" TagName="CounselorMenuFrame" TagPrefix="UCC" %>
<%# Register Src="~/Controls/ClientSession/ProductsFrame.ascx" TagName="ProductsFrame" TagPrefix="UCC" %>
<%# Register Src="~/Controls/ClientSession/ProductDetailFrame.ascx" TagName="ProductDetailFrame" TagPrefix="UCC" %>
<%# Register Src="~/Controls/ClientSession/ClientDetailFrame.ascx" TagName="ClientDetailFrame" TagPrefix="UCC" %>
<asp:Panel ID="pnlClntSummary" runat="server" EnableViewState="true" >
<asp:Panel ID="pnlClientDetailFrame" runat="server" Style="width: 950px;" >
<UCC:ClientDetailFrame id="clientDetailFrame" runat="server" />
</asp:Panel>
<asp:Panel ID="pnlProductDetailFrame" runat="server" Style="width: 950px;" >
<UCC:ProductDetailFrame id="productDetailFrame" runat="server"/>
</asp:Panel>
<div id="slider" style="width:950px;">
asp:Panel ID="pnlProductsFrame" runat="server" Style="width: 950px;" >
<table style="width:900px;" >
<tr><td></td><td>
<asp:LinkButton Text="Client Information" ID="clientDetail" Font-Underline="true"
Font-Bold="true" Font-Names="Calibri" Font-Size="Medium" runat="server"
onclick="clientDetail_Click"/>
</td>
</tr>
<tr>
<td valign="top" style="float:left" align="left">
<div style="float:left;vertical-align:top;">
<div id="content" class="contentMenu">
<UCC:ProductsFrame id="productsFrame" runat="server" />
</div>
</div>
</td>
<td valign="top" style="width:900px;" align="left">
<div id="header1" style="float:left;position:relative;width:45px;">
<table border="0">
<tr>
<td valign="top" style="width:30px;"
onclick="verticalprocessClick(document.getElementById('header1'))">
<div style="padding: 2px; cursor: pointer; vertical-align: top;">
<div style="float: left; vertical-align: bottom;">
<table>
<tr onclick="ImageChangePFrame(imgPF)">
<td class="VerticalLine">
</td>
<td>
<img id="imgPF" src="../Images/icon_expand.png" alt="(Show Details...)"
onload="ProductFrameHide(this)"/>
<div id="divClientProducts" runat="server"
style="float:left;font-family:Calibri;top:1%;left:25%;position:relative;font-size:13px;
color:Gray;text-align:center;">
C<br />
L<br />
I<br />
E<br />
N<br />
T<br />
<br />
P<br />
R<br />
O<br />
D<br />
U<br />
C<br />
T<br />
S<br />
</div>
</td>
<td class="VerticalLine">
</td>
</tr>
</table>
</div>
</div>
</td>
<td>
</td>
</tr>
</table>
</div>
<div id="divTransactionDesktop" style="float:left;width:600px; height:100px;" >
<asp:UpdatePanel ID="updatePanel" runat="server" UpdateMode="conditional" ChildrenAsTriggers="false">
<ContentTemplate>
<asp:PlaceHolder ID="MainFrameHolder" runat="server"></asp:PlaceHolder>
</ContentTemplate>
</asp:UpdatePanel>
<asp:HiddenField ID="hdnRowValue" runat ="server" Value="0" />
</div>
</td>
</tr>
</table>
</asp:Panel>
</div>
<asp:HiddenField ID="hdnLastFocus" runat="server" />
<asp:HiddenField ID="hdnKeyMapping" runat="server" />
</asp:Panel>
I found a solution for overlapping of panels in IE7. It was the height attribute which made a difference. Removing the height attribute or mentioning the exact value in pixels, solves this problem.