Not able to select item from dropdown using selenium webdriver for vba - vba

I have been trying to automatically select the first option from a dropdown in a webpage by using selenium webdriver for vba but unable to do so. I have tried using different methods like find element by ID, find element by xpath etc. but getting NoSuchElementError.
Here is the code which I have tried.
bot.FindElementById("ReportViewerControl_ctl04").Click
here is the HTML code for the element.
Any help would be greatly appreciated.
This is the whole HTML code of the web page.
<body style="margin: 0px; overflow: auto;">
<form id="ReportViewerForm" style="width: 100%; height: 100%;" action="./ReportViewer.aspx?%2fMPM%2fMPM_ProjectServices_Schedule" method="post">
<div class="aspNetHidden">
<input name="__EVENTTARGET" id="__EVENTTARGET" type="hidden" value="">
<input name="__EVENTARGUMENT" id="__EVENTARGUMENT" type="hidden" value="">
<input name="__VIEWSTATE" id="__VIEWSTATE" type="hidden" value="/wEPDwULLTE0NjY0NTA2NjMPZBYGZg8WAh4EVGV4dAUQPCFET0NUWVBFIGh0bWw+CmQCAg8WAh4EbGFuZwUFZW4tVVMWAgIBDxYCHwAFOAoJPE1FVEEgSFRUUC1FUVVJVj0iWC1VQS1Db21wYXRpYmxlIiBDT05URU5UPSJJRT1lZGdlIj4KZAIED2QWBAIED2QWBAIBDxYCHgVWYWx1ZWRkAgMPZBYCZg9kFgJmDxYCHwJkZAIFDxQrAAUPFgYeEFYxU3R5bGVTaGVldE5hbWVkHg5SZW5kZXJpbmdTdGF0ZQspkQFNaWNyb3NvZnQuUmVwb3J0aW5nLldlYkZvcm1zLlJlcG9ydFJlbmRlcmluZ1N0YXRlLCBSZXBvcnRpbmdTZXJ2aWNlc1dlYlNlcnZlciwgVmVyc2lvbj0xMy4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj04OTg0NWRjZDgwODBjYzkxAB4MU2Nyb2xsVGFyZ2V0ZGQoKVhTeXN0ZW0uR3VpZCwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNW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yQ29udHJvbCRjdGwwNCRjdGwwMyRkaXZEcm9wRG93biRjdGwxOAUxUmVwb3J0Vmlld2VyQ29udHJvbCRjdGwwNCRjdGwwMyRkaXZEcm9wRG93biRjdGwxOQUwUmVwb3J0Vmlld2VyQ29udHJvbCRjdGwwNCRjdGwwNSRkZERyb3BEb3duQnV0dG9uBTFSZXBvcnRWaWV3ZXJDb250cm9sJGN0bDA0JGN0bDA1JGRpdkRyb3BEb3duJGN0bDAwBTFSZXBvcnRWaWV3ZXJDb250cm9sJGN0bDA0JGN0bDA1JGRpdkRyb3BEb3duJGN0bDAyBTFSZXBvcnRWaWV3ZXJDb250cm9sJGN0bDA0JGN0bDA1JGRpdkRyb3BEb3duJGN0bDAzBTFSZXBvcnRWaWV3ZXJDb250cm9sJGN0bDA0JGN0bDA1JGRpdkRyb3BEb3duJGN0bDA0BTFSZXBvcnRWaWV3ZXJDb250cm9sJGN0bDA0JGN0bDA1JGRpdkRyb3BEb3duJGN0bDA1BTFSZXBvcnRWaWV3ZXJDb250cm9sJGN0bDA0JGN0bDA1JGRpdkRyb3BEb3duJGN0bDA2BTFSZXBvcnRWaWV3ZXJDb250cm9sJGN0bDA0JGN0bDA1JGRpdkRyb3BEb3duJGN0bDA3BTFSZXBvcnRWaWV3ZXJDb250cm9sJGN0bDA0JGN0bDA1JGRpdkRyb3BEb3duJGN0bDA4BTFSZXBvcnRWaWV3ZXJDb250cm9sJGN0bDA0JGN0bDA1JGRpdkRyb3BEb3duJGN0bDA5BSNSZXBvcnRWaWV3ZXJDb250cm9sJFRvZ2dsZVBhcmFtJGltZwUdUmVwb3J0Vmlld2VyQ29udHJvbCRjdGwwNyRpbWeh4k6oP2v2RyD7JkBegNWlkKc4gQzp2ZK9JtMLxgu//g==">
</div>
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['ReportViewerForm'];
if (!theForm) {
theForm = document.ReportViewerForm;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
<script src="/ReportServer/WebResource.axd?d=9xs5IOIfHw061TI0iHfRtCwcwm-Hj_q-6nrNp49wBW4ITTDIgspL_7LVbElrrTLYqCLVjoZNUhMNPIuGvaFRYw4C2NbxxS79dLaHu03gifA1&t=637100682046795651" type="text/javascript"></script>
<script src="/ReportServer/ScriptResource.axd?d=rk4cQgE67-CFfPE2bk9TbF_e_pYPZ5Fy_vkGwRwoX5kyz2YOoqnm25wmjRq4HmptTWVP1ULqYBrE4HHK-M3T7oBdrEWrJmxRhtlT9GbkJ79fFOP6HC8nzRVpzGlPfqlt_M1axvx-GXQ4M61ubN1d8G-JHeYRmdfdWkz6GkwbsSs1&t=ffffffffecf19baa" type="text/javascript"></script>
<script src="/ReportServer/ScriptResource.axd?d=jke1BTXXkzpx8QyDNk5MBiwVYnFwjyMgzINrp_oXCpsBkko99HnDr_rzrNzvHzyAK0PVFrKABrFWK2A1cbJGAJbwkSwrXJvC58YVxf1fRHELz28rRMUg7_2CTjGPKJGz9CX-d_sSPpCNu_L1MCfcx0n5LMLmxXZvpfRgYnHZscD5sc4_hs3mrssMm0HwH86i0&t=ffffffffecf19baa" type="text/javascript"></script>
<script src="/ReportServer/Reserved.ReportViewerWebControl.axd?OpType=Resource&Version=13.0.1601.5&Name=Microsoft.Reporting.WebForms.Scripts.BrowserNavigationCorrector.js" type="text/javascript"></script>
<script src="/ReportServer/Reserved.ReportViewerWebControl.axd?OpType=Resource&Version=13.0.1601.5&Name=ViewerScript" type="text/javascript"></script>
<script src="/ReportServer/ScriptResource.axd?d=Fu_zv7h1Rznnc_ZLFNjT_Rl-wO7fB-KT_fBurCijvyrOMaFdirVDY9f7YXWFS9ztJmFsSywt6hVjNzhGPBxcy8ngfF6wmT3RlOVFYhrfgLCjbMZghFZSluNhGZuZMv2RUdvGMP0YFyGxyUTl8OPevvG_yMfV4QGjvLKS3jVKjiQ1&t=ffffffffecf19baa" type="text/javascript"></script>
<div class="aspNetHidden">
<input name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" type="hidden" value="177045DE">
</div>
<script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('AjaxScriptManager', 'ReportViewerForm', ['tNavigationCorrector$ctl00','NavigationCorrector_ctl00','fReportViewerControl$ReportViewer','','fReportViewerControl$DocMap','','fReportViewerControl$ctl09$ReportArea',''], ['NavigationCorrector','NavigationCorrector'], ['ReportViewerControl$ctl09$ReportControl$ctl00',''], 0, '');
//]]>
</script>
<table width="100%" height="100%" cellspacing="0" cellpadding="0"><tbody><tr height="100%"><td width="100%">
<span><span id="ctl01_ctl00" style="display: none;"></span><script>
$addHandler(window, 'beforeunload', function() {Sys.WebForms.PageRequestManager.getInstance().abortPostBack();});
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function(sender, args) {
if (args.get_error() !== null) {
var label = $get('ctl01_ctl00');
label.style.display = '';
label.innerText = args.get_error().message;
label.textContent = label.innerText;
}
});
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(function(sender, args) {$get('ctl01_ctl00').style.display = 'none';});
</script></span><div id="NavigationCorrector" style="display: none;">
<input name="NavigationCorrector$ScrollPosition" id="NavigationCorrector_ScrollPosition" type="hidden"><input name="NavigationCorrector$ViewState" id="NavigationCorrector_ViewState" type="hidden"><input name="NavigationCorrector$PageState" id="NavigationCorrector_PageState" type="hidden" value="Loaded"><div id="NavigationCorrector_ctl00">
<input name="NavigationCorrector$NewViewState" id="NavigationCorrector_NewViewState" type="hidden">
</div>
</div><noscript>
&nbsp;Browser settings prevent scripts from running on this report. To view this report without scripts, click&nbsp;<a href="/reportserver?%2fMPM%2fMPM_ProjectServices_Schedule&amp;rs:Command=Render&amp;rs:Format=HTML5&amp;rc:LinkTarget=_top&amp;rc:Javascript=false&amp;rc:Toolbar=false">here</a>
</noscript><div id="ReportViewerControl_ReportViewer" style="width: 100%; height: 100%;">
<div id="ReportViewerControl" style="width: 100%; height: 100%;" onclick="if ($get('ReportViewerControl_ctl04') != null && $get('ReportViewerControl_ctl04').control != null) $get('ReportViewerControl_ctl04').control.HideActiveDropDown();" onactivate="if ($get('ReportViewerControl_ctl04') != null && $get('ReportViewerControl_ctl04').control != null) $get('ReportViewerControl_ctl04').control.HideActiveDropDown();">
<div id="ReportViewerControl_HttpHandlerMissingErrorMessage" style="padding: 10px; border: 2px solid red; overflow: auto; font-size: 0.85em; display: none;">
<h2>
Report Viewer Configuration Error
</h2><p>The Report Viewer Web Control HTTP Handler has not been registered in the application's web.config file. Add <add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, ReportingServicesWebServer, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /> to the system.web/httpHandlers section of the web.config file, or add <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, ReportingServicesWebServer, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /> to the system.webServer/handlers section for Internet Information Services 7 or later.</p>
</div><span id="ReportViewerControl_ctl03"><input name="ReportViewerControl$ctl03$ctl00" id="ReportViewerControl_ctl03_ctl00" type="hidden"><input name="ReportViewerControl$ctl03$ctl01" id="ReportViewerControl_ctl03_ctl01" type="hidden"></span><input name="ReportViewerControl$ctl10" id="ReportViewerControl_ctl10" type="hidden"><input name="ReportViewerControl$ctl11" id="ReportViewerControl_ctl11" type="hidden" value="standards"><div id="ReportViewerControl_AsyncWait" style="display: none; position: absolute; z-index: 1000; opacity: 0.7; background-color: white;">
</div><div class="WaitControlBackground" id="ReportViewerControl_AsyncWait_Wait" style="display: none; position: absolute; z-index: 1001;">
<table height="100%">
<tbody><tr>
<td width="32" height="32"><img style="width: 32px; height: 32px;" alt="Loading..." src="/ReportServer/Reserved.ReportViewerWebControl.axd?OpType=Resource&Version=13.0.1601.5&Name=Microsoft.Reporting.WebForms.Icons.SpinningWheel.gif"></td><td class="WaitInfoCell"><span class="WaitText">Loading...</span><div class="CancelLinkDiv">
<a class="CancelLinkText" href="javascript:$get('ReportViewerControl_AsyncWait').control._cancelCurrentPostback();">Cancel</a>
</div></td>
</tr>
</tbody></table>
</div><input name="ReportViewerControl$AsyncWait$HiddenCancelField" id="ReportViewerControl_AsyncWait_HiddenCancelField" type="hidden" value="False"><table id="ReportViewerControl_fixedTable" style="width: 100%; height: 100%; table-layout: fixed;" cellspacing="0" cellpadding="0">
<tbody><tr class="MenuBarBkGnd">
<td style="width: 25%; display: none;"></td><td style="width: 6px; display: none;"></td><td style="width: 100%;"></td>
</tr><tr id="ParametersRowReportViewerControl">
<td colspan="3"><div id="ReportViewerControl_ctl04" style="width: 100%; -ms-overflow-x: auto; -ms-overflow-y: hidden;">
<div onclick="if ($get('ReportViewerControl_ctl04') != null && $get('ReportViewerControl_ctl04').control != null) $get('ReportViewerControl_ctl04').control.HideActiveDropDown();" onactivate="if ($get('ReportViewerControl_ctl04') != null && $get('ReportViewerControl_ctl04').control != null) $get('ReportViewerControl_ctl04').control.HideActiveDropDown();">
<table width="100%" class="ParametersFrame ParamsGrid MenuBarBkGnd" id="ParameterTable_ReportViewerControl_ctl04" cellspacing="0" cellpadding="0" name="ParameterTable_ReportViewerControl_ctl04">
<tbody><tr>
<td width="100%" height="100%"><table id="ParametersGridReportViewerControl_ctl04">
<tbody><tr isparameterrow="true">
<td class="ParamLabelCell"><label for="ReportViewerControl_ctl04_ctl03_txtValue"><span>BU</span></label></td><td class="ParamEntryCell" style="padding-right: 0px;"><div id="ReportViewerControl_ctl04_ctl03" data-parametername="BU">
<div style="white-space: nowrap;" onactivate="event.cancelBubble=true;">
<input name="ReportViewerControl$ctl04$ctl03$txtValue" class="null" id="ReportViewerControl_ctl04_ctl03_txtValue" type="text" size="28" readonly="readonly"><input name="ReportViewerControl$ctl04$ctl03$ddDropDownButton" title="Select a value" id="ReportViewerControl_ctl04_ctl03_ddDropDownButton" style="margin-top: 1px; vertical-align: top; cursor: pointer;" type="image" alt="Select a value" src="/ReportServer/Reserved.ReportViewerWebControl.axd?OpType=Resource&Version=13.0.1601.5&Name=Microsoft.Reporting.WebForms.Icons.MultiValueSelect.gif">
</div>
</div></td><td class="InterParamPadding"></td><td class="ParamLabelCell"><label for="ReportViewerControl_ctl04_ctl05_txtValue"><span>Phase</span></label></td><td class="ParamEntryCell" style="padding-right: 0px;"><div id="ReportViewerControl_ctl04_ctl05" data-parametername="Phase">
<div style="white-space: nowrap;" onactivate="event.cancelBubble=true;">
<input name="ReportViewerControl$ctl04$ctl05$txtValue" class="null" id="ReportViewerControl_ctl04_ctl05_txtValue" type="text" size="28" readonly="readonly"><input name="ReportViewerControl$ctl04$ctl05$ddDropDownButton" title="Select a value" id="ReportViewerControl_ctl04_ctl05_ddDropDownButton" style="margin-top: 1px; vertical-align: top; cursor: pointer;" type="image" alt="Select a value" src="/ReportServer/Reserved.ReportViewerWebControl.axd?OpType=Resource&Version=13.0.1601.5&Name=Microsoft.Reporting.WebForms.Icons.MultiValueSelect.gif">
</div>
</div></td><td class="InterParamPadding"></td>
</tr>
</tbody></table></td><td width="6"></td><td class="SubmitButtonCell"><table>
<tbody><tr>
<td><input name="ReportViewerControl$ctl04$ctl00" id="ReportViewerControl_ctl04_ctl00" type="submit" value="View Report"></td>
</tr>
</tbody></table></td>
</tr>
</tbody></table><input disabled="disabled" style="display: none; visibility: hidden;" type="text">
</div>
</div><iframe name="ReportViewerControl_ctl04_ctl03_ctl01" title="BU place holder" id="ReportViewerControl_ctl04_ctl03_ctl01" src="javascript:'';" frameborder="0" longdesc="BU place holder" style="display: none; position: absolute; z-index: 10;" onclick="event.cancelBubble=true;" onactivate="event.cancelBubble=true;"></iframe><div id="ReportViewerControl_ctl04_ctl03_divDropDown" style="border: 1px solid darkgray; height: 150px; overflow: auto; display: none; position: absolute; z-index: 11; background-color: window;" onclick="event.cancelBubble=true;" onactivate="event.cancelBubble=true;">
<span><input name="ReportViewerControl$ctl04$ctl03$divDropDown$ctl01$HiddenIndices" id="ReportViewerControl_ctl04_ctl03_divDropDown_ctl01_HiddenIndices" type="hidden" value=""></span>
</div><iframe name="ReportViewerControl_ctl04_ctl05_ctl01" title="Phase place holder" id="ReportViewerControl_ctl04_ctl05_ctl01" src="javascript:'';" frameborder="0" longdesc="Phase place holder" style="display: none; position: absolute; z-index: 10;" onclick="event.cancelBubble=true;" onactivate="event.cancelBubble=true;"></iframe><div id="ReportViewerControl_ctl04_ctl05_divDropDown" style="border: 1px solid darkgray; height: 150px; overflow: auto; display: none; position: absolute; z-index: 11; background-color: window;" onclick="event.cancelBubble=true;" onactivate="event.cancelBubble=true;">
<span><input name="ReportViewerControl$ctl04$ctl05$divDropDown$ctl01$HiddenIndices" id="ReportViewerControl_ctl04_ctl05_divDropDown_ctl01_HiddenIndices" type="hidden" value=""></span>
</div></td>
</tr><tr style="height: 6px; font-size: 2pt;">
<td class="SplitterNormal" style="margin: 0px; padding: 0px; text-align: center; cursor: default;" colspan="3"><div id="ReportViewerControl_ToggleParam">
<input name="ReportViewerControl$ToggleParam$img" title="Hide Parameters" align="middle" id="ReportViewerControl_ToggleParam_img" aria-live="polite" style="cursor: pointer;" onclick="void(0);" type="image" alt="Hide Parameters" src="/ReportServer/Reserved.ReportViewerWebControl.axd?OpType=Resource&Version=13.0.1601.5&Name=Microsoft.Reporting.WebForms.Icons.SplitterHorizCollapse.png"><input name="ReportViewerControl$ToggleParam$store" id="ReportViewerControl_ToggleParam_store" type="hidden"><input name="ReportViewerControl$ToggleParam$collapse" id="ReportViewerControl_ToggleParam_collapse" type="hidden" value="false">
</div></td>
</tr><tr style="display: none;">
</tr><tr>
<td style="width: 25%; height: 100%; vertical-align: top; display: none;"><div style="width: 100%; height: 100%;">
<div id="ReportViewerControl_DocMap" style="width: 100%; height: 100%;">
<div id="ReportViewerControl_ctl08" style="display: none;">
<input name="ReportViewerControl$ctl08$ClientClickedId" id="ReportViewerControl_ctl08_ClientClickedId" type="hidden">
</div>
</div>
</div></td><td class="SplitterNormal" style="margin: 0px; padding: 0px; width: 4px; height: 100%; vertical-align: middle; display: none;"><div id="ReportViewerControl_ctl07">
<input name="ReportViewerControl$ctl07$img" title="Hide Document Map" align="top" id="ReportViewerControl_ctl07_img" aria-live="polite" style="cursor: pointer;" onclick="void(0);" type="image" alt="Hide Document Map" src="/ReportServer/Reserved.ReportViewerWebControl.axd?OpType=Resource&Version=13.0.1601.5&Name=Microsoft.Reporting.WebForms.Icons.SplitterVertCollapse.png"><input name="ReportViewerControl$ctl07$store" id="ReportViewerControl_ctl07_store" type="hidden"><input name="ReportViewerControl$ctl07$collapse" id="ReportViewerControl_ctl07_collapse" type="hidden" value="false">
</div></td><td style="height: 100%; vertical-align: top;"><div id="ReportViewerControl_ctl09" style="width: 100%; height: 247.27px; overflow: auto; position: relative;">
<div id="VisibleReportContentReportViewerControl_ctl09" role="main" style="display: none;"></div><div id="ReportViewerControl_ctl09_ReportArea">
<div id="ReportViewerControl_ctl09_VisibilityState" fornonreportcontentarea="false" newcontenttype="ReportingServices.WebFormsClient.ReportAreaContent.None">
<input name="ReportViewerControl$ctl09$VisibilityState$ctl00" type="hidden" value="None">
</div><input name="ReportViewerControl$ctl09$ScrollPosition" id="ReportViewerControl_ctl09_ScrollPosition" type="hidden"><span id="ReportViewerControl_ctl09_Reserved_AsyncLoadTarget"></span><div id="ReportViewerControl_ctl09_ReportControl" style="display: none;">
<span></span><input name="ReportViewerControl$ctl09$ReportControl$ctl02" type="hidden"><input name="ReportViewerControl$ctl09$ReportControl$ctl03" type="hidden"><input name="ReportViewerControl$ctl09$ReportControl$ctl04" id="ReportViewerControl_ctl09_ReportControl_ctl04" type="hidden" value="100">
</div><div id="ReportViewerControl_ctl09_NonReportContent" style="width: 100%; height: 100%; display: none;">
</div>
</div>
</div></td>
</tr>
</tbody></table>
</div>
</div>
</td></tr></tbody></table>

Related

cant disappear placeholder after focus on it

Here I am using the angular material form for login form using Angular5. when the applications starts, the login form placeholder couldn't be over-written. But once one I logged in and logged out, then only the input fields would be over written. Screenshot
<form [formGroup]="loginform" class="login-form">
<mat-icon style="font-size: 30px ">account_circle</mat-icon>
<mat-form-field class="example-full-width">
<input matInput placeholder="Username" formControlName="userName">
</mat-form-field>
<br>
<mat-icon style="font-size: 30px">lock_open</mat-icon>
<mat-form-field>
<input matInput placeholder="Enter your password" [type]="hide ? 'password' : 'text'" formControlName="password">
<mat-icon matSuffix (click)="hide = !hide">{{!hide ? 'visibility' : 'visibility_off' }}</mat-icon>
</mat-form-field>
<button mat-raised-button color="primary" [disabled]="!loginform.valid" (click)="clicklogin();loginform.reset()">Login</button>
<button mat-raised-button color="primary">cancel</button>
</form>
CSS File
.login-form{
top: 35%;
border: 1px;
border-style: double;
position: absolute;
width: 30%;
border-radius: 5px;
padding: 20px;
left: 30%;
}
mat-form-field{
width: 80%;
}
button{
text-align: center;
margin-left :17%;
}
mat-icon{
float: left;
line-height: 2;
margin-right: 10px;
}
You can use mat-placeholder and handle visibility easily by CSS
styles:
.placeholder.hide-ph {
display: none;
}
component.ts:
<input
...
[value]="value"
floatPlaceholder="never"
(focus)="hidePlaceholder = true" // <== you need this
/>
<mat-icon class="caret" matSuffix>arrow_drop_down</mat-icon>
<mat-placeholder
class="placeholder"
[class.hide-ph]="!!value || hidePlaceholder" // <== and this to hide placeholder by css
>
{{ placeholder }}
</mat-placeholder>
Its working fine for me.
.login-form{
top: 35%;
border: 1px;
border-style: double;
position: absolute;
width: 30%;
border-radius: 5px;
padding: 20px;
left: 30%;
}
mat-form-field{
width: 80%;
}
button{
text-align: center;
margin-left :17%;
}
mat-icon{
float: left;
line-height: 2;
margin-right: 10px;
}
<form [formGroup]="loginform" class="login-form">
<mat-icon style="font-size: 30px ">account_circle</mat-icon>
<mat-form-field class="example-full-width">
<input matInput placeholder="Username" formControlName="userName">
</mat-form-field>
<br>
<mat-icon style="font-size: 30px">lock_open</mat-icon>
<mat-form-field>
<input matInput placeholder="Enter your password" [type]="hide ? 'password' : 'text'" formControlName="password">
<mat-icon matSuffix (click)="hide = !hide"></mat-icon>
</mat-form-field>
<button mat-raised-button color="primary" [disabled]="!loginform.valid" (click)="clicklogin();loginform.reset()">Login</button>
<button mat-raised-button color="primary">cancel</button>
</form>

Custom (width and height) to print Product Labels on Odoo - QWEB

Right now the system is printing the Product Labels and work fine but in wrong dimensions.
I need set width to 7cm and height to 4cm on QWEB report.
Where I can change the dimensions to print QWEB report?
I can't change the format to the print preferences because in a sheet can be many Products Labels.
This is my QWEB:
<?xml version="1.0"?>
<t t-name="product.report_productlabel">
<t t-call="report.html_container">
<div class="page">
<style>
</style>
<t t-foreach="docs" t-as="template">
<t t-foreach="template.product_variant_ids" t-as="product">
<div class="col-xs-6" style="padding:0;">
<table style="border-spacing:0;margin-bottom:0;height: 110px;border: 2px solid black;" class="table">
<thead>
<tr style="width: 3in;">
<td style="width: 2.63in;text-align: center;background-color: #fff;" colspan="2" class="col-xs-8 danger">
<strong style="text-transform: uppercase;">
<t t-esc="product.name"/>
</strong>
</td>
</tr>
</thead>
<tbody>
<tr style="width: 1in;">
<td style="text-align: center; border-top: 0px solid #fff; padding: 0px 5px 0px 5px;" class="col-xs-5">
<h4 style="border: 4px solid #ff4040;border-radius: 9px;background-color: #ffff00;padding: 10px 12px 10px 12px;font-size: 26px;margin-top: 0px;margin-bottom: 0px;">
<strong t-field="product.list_price" />
<strong>
<t t-esc="product.company_id.currency_id.symbol"/>
</strong>
</h4>
</td>
<td style="text-align: center;border-top: 0px solid #fff;padding: 0px 5px 0px 5px;" class="col-xs-7">
<img class="img-responsive"
t-att-src="'data:image/png;base64,%s' % res_company.logo"
style="background-color: #fff;margin-left: auto;margin-right: auto;width: auto;height: 16px;margin-bottom: 8px;"/>
<img class="img-responsive" t-if="product.barcode"
t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('EAN13', product.barcode, 650, 200)"
style="height: 20px;width: 100%;"/>
<span style="">
<t t-esc="product.barcode"/>
</span>
</td>
</tr>
</tbody>
</table>
</div>
</t>
</t>
</div>
This the solution for the width of the table using the DPI of 90;
<table style="border-spacing:0;margin-bottom:0;height: 187px; width: 319px; border: 2px solid black;" class="table">
This is the QWEB template with the dimensions you need and I also scale the fonts and padding of the table elements to match the new width and height:
<?xml version="1.0"?>
<t t-name="product.report_productlabel">
<t t-call="report.html_container">
<div class="page">
<style>
</style>
<t t-foreach="docs" t-as="template">
<t t-foreach="template.product_variant_ids" t-as="product">
<div class="col-xs-6" style="padding:0;">
<table style="border-spacing:0;margin-bottom:0;height: 187px; width: 319px; border: 2px solid black;"
class="table">
<thead>
<tr style="width: 3in;">
<td style="width: 2.63in; font-size: 19px; text-align: left; background-color: #fff; margin-top: 10px;"
colspan="2"
class="col-xs-8 danger">
<strong style="text-transform: uppercase;">
<t t-esc="product.name"/>
</strong>
</td>
</tr>
</thead>
<tbody>
<tr style="width: 1in;">
<td width="50%"
style="text-align: center; border-top: 0px solid #fff; padding: 5px; position: relative;">
<div style="position:absolute; bottom: 20px; left: 0; padding-left: 5px; width: 100%">
<h4 style="border: 4px solid #ff4040; border-radius: 9px; background-color: #ffff00; padding: 10px 6px; font-size: 21px; margin: 0px ">
<strong t-field="product.list_price"/>
<strong>
<t t-esc="product.company_id.currency_id.symbol"/>
</strong>
</h4>
</div>
</td>
<td width="50%"
style="text-align: center;border-top: 0px solid #fff;padding: 5px; position: relative;">
<div style="position:absolute; bottom: 20px; padding-right: 5px;">
<img class="img-responsive"
t-att-src="'data:image/png;base64,%s' % res_company.logo"
style="background-color: #fff; margin-left: auto; margin-right: auto; width: auto; height: 35px; margin-bottom: 5px;"/>
<img class="img-responsive" t-if="product.barcode"
t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('EAN13', product.barcode, 650, 200)"
style="height: 20px; width: 100%;"/>
<span style="font-size: 14px">
<t t-esc="product.barcode"/>
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</t>
</t>
</div>
</t>
You might look at the report.paperformat model, which defines the format for the paper size. You find the default values in addons\report\views\report_paperformat_views.xml.

How we can select item from drop down combo box using value of element in selenium webdriver

I need to know how we can select a value from drop down combo box using value of that item.
Below is the form tag
<form id="rahul" onkeypress="EnterHandler();" onsubmit="javascript:return WebForm_OnSubmit();" action="./RequestSubmission?CC8510F49CCCF2&" method="post">
<div class="rcbSlide" style="z-index: 6000; visibility: visible; display: block; overflow: visible; margin-left: 0px; position: absolute; top: 575.2px; left: 768.183px; height: 202px; width: 300px;">
<div id="ctl00_MainContent_ucAdditionalDetailsMAP_txtResponsiblePerson_DropDown" class="RadComboBoxDropDown RadComboBoxDropDown_MetroTouch rcbAutoWidth rcbAutoWidthResizer" style="display: block; visibility: visible; top: 0px; left: 0px; transition: none 0s ease 0s ;">
<div class="rcbScroll rcbWidth rcbNoWrap" style="height: 200px; width: 100%; overflow: auto;">
<ul class="rcbList" style="list-style:none;margin:0;padding:0;zoom:1;">
<li class="rcbItem">Aava, Ruth</li>
<li class="rcbItem">Abdelgawwad, Khaled</li>
<li class="rcbItem">Achcar, Cecilia</li>
<li class="rcbItem">Achilles, Karin</li>
<li class="rcbItem">Adachi, Masatoshi</li>
<li class="rcbItem">admin, bayer</li>
<li class="rcbItem">Adriane, Fernandes</li>
<li class="rcbItem">Aeschliman, Lisa</li>
<li class="rcbItem">Afonja, Olubunmi</li>
</ul>
</div>
</div>
</div>
</form>
Here is the div tag from where we are selecting the value from drop down combo box.
<div id="ctl00_MainContent_ucAdditionalDetailsMAP_txtResponsiblePerson" class="RadComboBox RadComboBox_MetroTouch" style="width:350px;">
<table class="" style="border-width: 0px; border-collapse: collapse;" summary="combobox">
<tbody>
<tr>
<td class="rcbInputCell rcbInputCellLeft" style="width:100%;">
<input id="ctl00_MainContent_ucAdditionalDetailsMAP_txtResponsiblePerson_Input" class="rcbInput radPreventDecorate rcbEmptyMessage" type="text" value="Select" name="ctl00$MainContent$ucAdditionalDetailsMAP$txtResponsiblePerson" autocomplete="off">
</td>
<td class="rcbArrowCell rcbArrowCellRight">
<a id="ctl00_MainContent_ucAdditionalDetailsMAP_txtResponsiblePerson_Arrow" style="overflow: hidden;display: block;position: relative;outline: none;">select</a>
</td>
</tr>
</tbody>
</table>
</div>
I want to know how we can select li item "Aava, Ruth" in selenium webdriver using its value.
Use below XPath
//ul[#class='rcbList']/li[1]
OR
//ul[#class='rcbList']/li[contains(.,'Aava, Ruth')]
You can select it directly by using below code:-
driver.findElement(By.xpath("//ul[#class='rcbList']/li[1]")).click();
Note:- First click on dropbox then use above code
Hope it will help you :)

change content when resize in gridster.js

i just learn to using gridster, and i want to create a card show general infomation and when user select expand the card, this wil change content and show full infomation off the product!
this is the card before click expand
<ul>
<li class="firm" data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div style="width: 95%; height: 80%; float: left; margin: 5px" id="divMain_1">
<div id="headerCol" style="width: 100%; height: 15%">
<span id="quankul">asset under management</span>
</div>
<div id="totalCol" style="width: 100%; height: 25%">
<span class="bold secondDiv" style="font-size: 24px">$1.41 Billion</span> <span class="bold">
(total asset)</span>
</div>
<div class="secondDiv" style="width: 100%; height: 50%; float: left">
<div style="float: left; width: 100%">
<div style="float: left; width: 70%">
<span class="bold">Top 3 Plan</span>
</div>
<div style="float: left; width: 30%">
</div>
</div>
<div style="float: left; width: 100%">
<div style="float: left; width: 70%">
<span>Seafood Gallery</span>
</div>
<div style="float: left; width: 30%">
<span>$100.000</span>
</div>
</div>
<div style="float: left; width: 100%">
<div style="float: left; width: 70%">
<span>ACME Enterprise</span>
</div>
<div style="float: left; width: 30%">
<span>$200.000</span>
</div>
</div>
<div style="float: left; width: 100%">
<div style="float: left; width: 70%">
<span>Ashley Cleaning</span>
</div>
<div style="float: left; width: 30%">
<span>$300.000</span>
</div>
</div>
</div>
</div>
<div id="expand" style="width: 100%;padding-bottom:0px; float: right;text-align:right">
<span>Expand</span>
</div>
<div id="collapse" style="width: 100%;padding-bottom:10px;height:20%;text-align:right;display:none">
<span>Collapse</span>
</div>
</li>
and when i click "expand" this will show ful infomation about the product;
can you help me to do it!

Display partial view in a main View

Please I need to know how to display a partial view in a specific area in the main view , this is my source code
Main View: cshtml
<table align="left" border="5px" cellspacing="2px" style="border:2px solid black">
<tr>
<table>
<tr>
<td style="border:2px solid black">
<div style="background-color: #fff; border: 6px solid #ccc; height: 700px; width: 500px; margin: 20px; padding: 20px;" align="center">Select Baseline Image
<input type="button" value="Upload" align="right">
<div style="background-color: #fff; border: 6px solid #ccc; height: 500px; width: 300px; margin: 20px; padding: 20px;" align="center">#Html.Partial("_DisplayImage")</div>
</div>
<form method="POST">
<input id="leftUrlTB" name="URL" type="Text" style="background-color: #fff; border: 6px solid #ccc"/>
<input id="leftBrowser" name="leftBrowser" value="Firefox" type="radio" />Firefox<br>
<input id="leftBrowser" name="leftBrowser" value="Chrome" type="radio" />Chrome<br>
<input id="leftBrowser" name="leftBrowser" value="Internet Explorer" type="radio" />Internet Explorer<br>
<input type="submit" value="Capture" align="right">
</form>
</td>
<td style="border:2px solid black">
<div style="background-color: #fff; border: 6px solid #ccc; height: 700px; width: 500px; margin: 20px; padding: 20px;" align="center">Select Comparison Image
<input type="button" value="Upload" align="right">
<div style="background-color: #fff; border: 6px solid #ccc; height: 500px; width: 300px; margin: 20px; padding: 20px;" align="center"></div></div>
<form method="POST">
<input id="rightUrlTB" name="URL" type="Text" style="background-color: #fff; border: 6px solid #ccc"/>
<input id="rightBrowser" name="leftBrowser" value="Firefox" type="radio" />Firefox<br>
<input id="rightBrowser" name="leftBrowser" value="Chrome" type="radio" />Chrome<br>
<input id="rightBrowser" name="leftBrowser" value="Internet Explorer" type="radio" />Internet Explorer<br>
<input type="submit" value="Capture" align="right">
</form>
</td>
</tr>
</table>
</tr>
<tr>
<td >
<div style="background-color: #fff; border: 6px solid #ccc; height: 700px; width: 1100px; margin: 20px; padding: 20px;" align="center"></div>
</td>
the partial view code is this one :
<img src="#Url.Action("WebAppView")" />
And I got those controllers :
public ActionResult WebAppView()
{
return View();
}
[HttpPost]
public ActionResult WebAppView(string url, string selectedBrowserRadio)
{
selectedBrowserRadio = Request.Form["leftBrowser"];
selectedBrowserRadio = selectedBrowserRadio.Replace(" ", string.Empty);
var selectedBrowser = (Browser)Enum.Parse(typeof(Browser), selectedBrowserRadio, true);
var bmp= ScreenShotter.TakeScreenShot(selectedBrowser, url);
var converter = new ImageConverter();
var bmpArray = (byte[])converter.ConvertTo(bmp, typeof(byte[]));
return File(bmpArray,"image/png");
}
public ViewResult _DisplayImage()
{
return View("_DisplayImage");
}
My problem is that the image returned is displayed in the whole view not in the div area in which I specified. I need to render it in the left div area
thank you
Try changing
public ActionResult WebAppView()
{
return View();
}
into
public ActionResult WebAppView()
{
return PartialView();
}
#Html.Partial("_DisplayImage") should call directly to the partial view and not go through the controller.
Did you mean to use #Html.RenderAction() to call the Action method? and if so your action method is returning a view("_DisplayImage") result and not a PartialView("_DisplayImage") which it should be.