Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
hackton
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestAutomation.aspx.cs" Inherits="TestAutomation.TestAutomation" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script type="text/javascript" src="scripts/jquery-1.10.2.js"></script> <script type="text/javascript" src="jquery/jquery-ui.js"></script> <script> function myFunction() { var x = document.getElementById("DropDownList1").value; document.getElementById("hdntargtool").value = x; } function GetCityNameArray() { var DropDownList1 = $("#DropDownList1") if (DropDownList1[0].value == '' || DropDownList1[0].value == '--Select--') { alert("please select TargetTool"); return false; } var things = []; var grid = document.getElementById("<%=GridView1.ClientID%>"); var inputs = grid.getElementsByTagName("input"); for (var i = 0; i < grid.rows.length - 1; i++) { var id = ""; var operation = ""; var testdate = ""; var engine = ""; var txtobj = $("input[id*=txtobj]") if (txtobj[i].value != '') { //alert(txtobj[i].value); id = txtobj[i].value; } var ddroperation = $("[id*=ddroperation]") if (ddroperation[i].value != '' && ddroperation[i].value != '--Select--') { //alert(ddroperation[i].value); operation= ddroperation[i].value } var txttestdata = $("input[id*=txttestdata]") if (txttestdata[i].value != '' ) { //alert(txttestdata[i].value); testdate = txttestdata[i].value; } var DropDownList1 = $("#DropDownList1") if (DropDownList1[0].value != '' && DropDownList1[0].value != '--Select--') { //alert(txttestdata[i].value); engine = DropDownList1[0].value; } things.push({ ID: id, Operation: operation, TestDate: testdate, Engine: engine }); } var result = PageMethods.GetCityNameArray(things, OnRequestComplete, OnRequestError); return false; } function OnRequestComplete(result, userContext, methodName) { var Person = eval('(' + result + ')'); //alert(Person); $('#lblVessel').html(Person); return false; //alert(Person.Surname); } function OnRequestError(error, userContext, methodName) { if (error != null) { alert(error.get_message()); return false; } } function OnSuccessGetCityNameArray(response) { return false; //for (var i in response) { // alert(response[i]); //} } $(document).ready(function () { $('#<%=btnAdd.ClientID %>').bind('click', function (event) { var $grid = $('#<%=GridView1.ClientID %>'); var $row = $grid.find('tr:last').clone().appendTo($grid); $row.find('select')[0].selectedIndex = 0; $row.find('input').each(function() { $(this).val(""); }); return false; }); $(".editablebox").change(function () { $(".timetextbox").val($(".editablebox option:selected").html()); }); }); </script> <style> .editablebox { width: 75px; height: 30px; } .timetextbox { width: 54px; height: 25px; border: none; } .rcorners3 { border-radius: 25px; border: 2px solid #73AD21; padding: 20px; width: 200px; height: 150px; display:inline-block; } </style> <style> .button { display: inline-block; padding: 1px 5px; font-size: 15px; cursor: pointer; text-align: center; text-decoration: none; outline: none; color: #fff; background-color: #4CAF50; border: none; border-radius: 15px; box-shadow: 0 3px #999; } .button:hover {background-color: #3e8e41} .button:active { background-color: #3e8e41; box-shadow: 0 5px #666; transform: translateY(4px); } </style> </head> <body> <form id="form1" runat="server"> <div style="text-align: center"> <h1 style="align-content: center; font-style: oblique">Automation Code Generator </h1> <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true"> </asp:ScriptManager> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" HorizontalAlign="Center"> <Columns> <asp:TemplateField HeaderText="Object"> <ItemTemplate> <asp:TextBox ID="txtobj" runat="server"></asp:TextBox> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Operationss"> <ItemTemplate> <asp:DropDownList ID="ddroperation" runat="server"> <asp:ListItem>--Select--</asp:ListItem> <asp:ListItem>Click</asp:ListItem> <asp:ListItem>Select</asp:ListItem> <asp:ListItem>Enter</asp:ListItem> <asp:ListItem>Get</asp:ListItem> </asp:DropDownList> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Value"> <ItemTemplate> <asp:TextBox ID="txttestdata" runat="server"></asp:TextBox> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> <div style="margin-right:-270px"> <asp:Button ID="btnAdd" Text="Add More" CssClass="button" runat="server" /> </div> <br /> Select Target Tool : <asp:DropDownList ID="DropDownList1" runat="server"> <asp:ListItem>--Select--</asp:ListItem> <asp:ListItem>UFT(VBScript)</asp:ListItem> <asp:ListItem>Selenium(Java)</asp:ListItem> <asp:ListItem>Selenium(C#)</asp:ListItem> <asp:ListItem>Tosca</asp:ListItem> </asp:DropDownList> <asp:Button Text="Generate" CssClass="button" runat="server" ID="btnsubmit" OnClientClick="return GetCityNameArray();" /> <br /> <br /> <br /> <br /> <div ID="lblVessel" class="rcorners3" >Invalid Objects<br/>Invalid Objects<br/>Invalid Objects<br/> </div> </div> </form> </body> </html>
run
|
edit
|
history
|
help
0
MegaWays
Seizoen bepalen in C#
Test equality...1
Konsol Üçgen Çizimi
1
Ex03 cm=ft,in
Easter Holiday Calculator
Cotton Farm v: (0.0.0.002)
Математика
Free cash app money