How to use goBack method in Playwright Internal

Best JavaScript code snippet using playwright-internal

js.js

Source:js.js Github

copy

Full Screen

...105 residentialStatus('frei','property_space','Wohnstatus');106 residentialStatus('vermietet','property_space','Wohnstatus');107 residentialStatus('teilweise_vermietet','property_space','Wohnstatus'); 108109 function goBack(select,show,hide){110 document.getElementById(select).addEventListener('click',function(){111 document.getElementById(show).style.display = "flex";112 document.getElementById(hide).style.display = "none";113114 });115 }116 goBack('one_back','stepOne','Wohnstatus');117 goBack('two_back','Wohnstatus','property_space');118 goBack('three_back','property_space','property_built');119 goBack('four_back','property_built','condition');120 goBack('five_back','condition','balcony');121 goBack('six_back','balcony','desired_price');122 goBack('seven_back','desired_price','property_located');123 goBack('eight_back','property_located','last_step');124125126 function goForward(select,show,hide){127 document.getElementById(select).addEventListener('click',function(){128 document.getElementById(show).style.display = "flex";129 document.getElementById(hide).style.display = "none";130131 132 }); 133134 }135 goBack('one_next','property_built','property_space');136 goBack('two_next','condition','property_built');137 goBack('three_next','property_located','desired_price');138 goBack('four_next','last_step','property_located');139 //goBack('five_next','last_step','property_located');140141142 });143144145146147/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */148149 document.getElementById("five_next").addEventListener('click',function(){150 var Firstname = document.getElementById("Firstname").value;151 var Surname = document.getElementById("Surname").value;152 var E_mail_address = document.getElementById("E_mail_address").value;153 var Telephone_number = document.getElementById("Telephone_number").value;154155 Email = E_mail_address;156 MailingInfo = "First Name: "+Firstname+ "<br> Surname: "+Surname + "<br> Phone Number: "+ Telephone_number + "<br> Email: "+Email;157158 console.log(MailingInfo); 159160 document.getElementById("five_next").style.display = "none";161 document.getElementById("stepOne").style.display = "none";162 document.getElementById("completed").innerHTML = "<h1>All DOne</h1>";163164});165166167 168 169170/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */171172 173174}175clickImg('wohnung_select','Wohnstatus','stepOne');176 177 178 179180 181function haus_select(select,show,hide){182 document.getElementById(select).addEventListener('click',function(){ 183 document.getElementById(show).style.display = "flex";184 document.getElementById(hide).style.display = "none"; 185 PropertyName = this.alt;186 console.log(PropertyName); 187188 189 function HomeDetails(select,show,hide){190 document.getElementById(select).addEventListener('click',function(){191192 document.getElementById(show).style.display = "flex";193 document.getElementById(hide).style.display = "none"; 194 HomeDetails = this.alt;195 console.log(HomeDetails); 196197 function residentialStatus(select,show,hide){ 198 document.getElementById(select).addEventListener('click',function(){199200 document.getElementById(show).style.display = "flex";201 document.getElementById(hide).style.display = "none"; 202 ResidentialStatus = this.alt;203 console.log(ResidentialStatus);204205206 207208 function condition_property(select,show,hide){209210 document.getElementById(select).addEventListener('click',function(){211 document.getElementById(show).style.display = "flex";212 document.getElementById(hide).style.display = "none"; 213 ConditionProperty = this.alt;214 console.log(ConditionProperty); 215216217218219 function balcony(select,show,hide){220 document.getElementById(select).addEventListener('click',function(){221 document.getElementById(show).style.display = "flex";222 document.getElementById(hide).style.display = "none"; 223 224 BalconyTerrace = this.alt;225 console.log(BalconyTerrace);226227 document.getElementById('desired_price_range').addEventListener('change',function(){228 DesiredPrice = this.value;229 console.log(DesiredPrice); 230231 });232233234 document.getElementById("four_next").addEventListener('click',function(){235 var StreetNo = document.getElementById("StreetNo").value;236 var Postcode = document.getElementById("Postcode").value;237 var Place = document.getElementById("Place").value;238 RegionPropertyLocated = "Street No.: "+ StreetNo + "<br> Post Code: " + Postcode + "<br> Place Name: " + Place;239 console.log(RegionPropertyLocated); 240 }); 241242 }); 243244245 }246 balcony('balkon','desired_price','balcony');247 balcony('terrasse','desired_price','balcony');248 balcony('balkon_and_terrasse','desired_price','balcony');249 balcony('weder_noch','desired_price','balcony');250251252 });253254 }255 condition_property('renovierungs_bedurftig','balcony','condition');256 condition_property('neuwertig','balcony','condition');257 condition_property('gepflegt','balcony','condition');258259 260261 });262263 }264 residentialStatus('selbst_bewohunt','property_space','Wohnstatus');265 residentialStatus('frei','property_space','Wohnstatus');266 residentialStatus('vermietet','property_space','Wohnstatus');267 residentialStatus('teilweise_vermietet','property_space','Wohnstatus'); 268 269 270 271 });272273 274275 var property_space = document.getElementById("range");276 var sliderOutput = document.getElementById("amount"); 277 property_space.oninput = function(){278 sliderOutput.innerHTML = this.value;279 LivingSpace = this.value;280 console.log(LivingSpace);281 }282 var slider = document.getElementById("property_built_range");283 var output = document.getElementById("property_built_amount"); 284 slider.oninput = function(){285 output.innerHTML = this.value;286 PropertyBuilt = this.value;287 console.log(PropertyBuilt);288 }289290 var size_slider = document.getElementById("property_size_range");291 var size_output = document.getElementById("property_size_amount"); 292 size_slider.oninput = function(){293 size_output.innerHTML = this.value;294 PropertyArea = this.value;295 console.log(PropertyArea);296 } 297 298 }299 HomeDetails('einfamilienhaus','Wohnstatus','HomeDetails');300 HomeDetails('mehrfamilienhaus','Wohnstatus','HomeDetails');301 HomeDetails('reihenhaus','Wohnstatus','HomeDetails');302 HomeDetails('doppelhaushalfte','Wohnstatus','HomeDetails'); 303304305306307308309310311 function goBack(select,show,hide){312 document.getElementById(select).addEventListener('click',function(){313 document.getElementById(show).style.display = "flex";314 document.getElementById(hide).style.display = "none";315316 }); 317 }318 goBack('one_back','HomeDetails','Wohnstatus');319 goBack('two_back','Wohnstatus','property_space');320 goBack('three_back','property_size','property_built');321 goBack('four_back','property_built','condition');322 goBack('five_back','condition','balcony');323 goBack('six_back','balcony','desired_price');324 goBack('seven_back','desired_price','property_located');325 goBack('eight_back','property_located','last_step');326 goBack('haus_one_back','stepOne','HomeDetails');327 goBack('size_three_back','property_space','property_size');328329330 function goForward(select,show,hide){331 document.getElementById(select).addEventListener('click',function(){332 document.getElementById(show).style.display = "flex";333 document.getElementById(hide).style.display = "none";334335 336 }); 337 338 }339 goBack('one_next','property_size','property_space');340 goBack('two_next','condition','property_built');341 goBack('three_next','property_located','desired_price');342 goBack('four_next','last_step','property_located');343 goBack('size_two_next','property_built','property_size');344 //goBack('five_next','last_step','property_located');345346347348349350/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */351352 document.getElementById("five_next").addEventListener('click',function(){353 var Firstname = document.getElementById("Firstname").value;354 var Surname = document.getElementById("Surname").value;355 var E_mail_address = document.getElementById("E_mail_address").value;356 var Telephone_number = document.getElementById("Telephone_number").value;357358 Email = E_mail_address;359 MailingInfo = "First Name: "+Firstname+ "<br> Surname: "+Surname + "<br> Phone Number: "+ Telephone_number + "<br> Email: "+Email;360361 console.log(MailingInfo); 362363 document.getElementById("five_next").style.display = "none";364 document.getElementById("stepOne").style.display = "none";365 document.getElementById("completed").innerHTML = "<h1>All DOne</h1>";366367});368369370 371/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */372373374 });375376377 378379}380haus_select('haus_select','HomeDetails','stepOne');381 382 383384385386387388389390391 function grundstuck_select(select,show,hide){392 document.getElementById(select).addEventListener('click',function(){ 393 document.getElementById(show).style.display = "flex";394 document.getElementById(hide).style.display = "none"; 395 PropertyName = this.alt;396 console.log(PropertyName); 397398 function propertyInfo(select,show,hide){399 document.getElementById(select).addEventListener('click',function(){400 document.getElementById(show).style.display = "flex";401 document.getElementById(hide).style.display = "none"; 402 PropertyName = this.alt;403 console.log(PropertyName); 404 405406 function propertybuilton(select,show,hide){407 document.getElementById(select).addEventListener('click',function(){408 document.getElementById(show).style.display = "flex";409 document.getElementById(hide).style.display = "none"; 410 PropertyName = this.alt;411 console.log(PropertyName); 412413414 document.getElementById('desired_price_range').addEventListener('change',function(){415 DesiredPrice = this.value;416 console.log(DesiredPrice); 417418 });419420421 document.getElementById("four_next").addEventListener('click',function(){422 var StreetNo = document.getElementById("StreetNo").value;423 var Postcode = document.getElementById("Postcode").value;424 var Place = document.getElementById("Place").value;425 RegionPropertyLocated = "Street No.: "+ StreetNo + "<br> Post Code: " + Postcode + "<br> Place Name: " + Place;426 console.log(RegionPropertyLocated); 427 }); 428429430 });431 }432 propertybuilton('kurzfristingbebaubar','desired_price','propertybuilton');433 propertybuilton('eingeschrankt','desired_price','propertybuilton');434 propertybuilton('nicht_bebaubar','desired_price','propertybuilton');435 propertybuilton('unbekannt','desired_price','propertybuilton');436437438 });439 }440 propertyInfo('baugrundstuck','propertybuilton','propertyInformation');441 propertyInfo('gewerbegrundstuck','propertybuilton','propertyInformation');442 propertyInfo('agrarflache','propertybuilton','propertyInformation');443444445446447 function goBack(select,show,hide){448 document.getElementById(select).addEventListener('click',function(){449 document.getElementById(show).style.display = "flex";450 document.getElementById(hide).style.display = "none"; 451 }); 452 }453 goBack('one_back','HomeDetails','Wohnstatus');454 goBack('two_back','Wohnstatus','property_space');455 goBack('three_back','property_size','property_built');456 goBack('four_back','property_built','condition');457 goBack('five_back','condition','balcony'); 458 goBack('six_back','propertybuilton','desired_price');459 goBack('seven_back','desired_price','property_located');460 goBack('eight_back','property_located','last_step');461 goBack('propertyInfo_four_back','stepOne','propertyInformation'); 462 goBack('propertybuilton_four_back','propertyInformation','propertybuilton');463 464465 function goForward(select,show,hide){466 document.getElementById(select).addEventListener('click',function(){467 document.getElementById(show).style.display = "flex";468 document.getElementById(hide).style.display = "none"; 469 470 }); 471 } 472 goBack('one_next','property_size','property_space');473 goBack('two_next','condition','property_built');474475 goBack('three_next','property_located','desired_price');476 goBack('four_next','last_step','property_located');477 goBack('size_two_next','property_built','property_size');478479480481 });482}483grundstuck_select('grundstuck','propertyInformation','stepOne');484485486487function gewerbe_select(select,show,hide){488 document.getElementById(select).addEventListener('click',function(){ 489 document.getElementById(show).style.display = "flex";490 document.getElementById(hide).style.display = "none"; 491 PropertyName = this.alt;492 console.log(PropertyName); 493494495 function commercialpropertyinfo(select,show,hide){496 document.getElementById(select).addEventListener('click',function(){ 497 document.getElementById(show).style.display = "flex";498 document.getElementById(hide).style.display = "none"; 499 PropertyName = this.alt;500 console.log(PropertyName);501502503 function usagestatusInfo(select,show,hide){504 document.getElementById(select).addEventListener('click',function(){ 505 document.getElementById(show).style.display = "flex";506 document.getElementById(hide).style.display = "none"; 507 PropertyName = this.alt;508 console.log(PropertyName);509 });510 }511 usagestatusInfo('frei_status','property_space','usagestatus');512 usagestatusInfo('vermietet_status','property_space','usagestatus');513 usagestatusInfo('teilweise_vermietet_status','property_space','usagestatus');514515516517 });518 519 }520 commercialpropertyinfo('buro','usagestatus','commercialproperty');521 commercialpropertyinfo('gastgewerbe','usagestatus','commercialproperty');522 commercialpropertyinfo('halle_Produktion','usagestatus','commercialproperty');523 commercialpropertyinfo('hotel_pension','usagestatus','commercialproperty');524525526 function goBack(select,show,hide){527 document.getElementById(select).addEventListener('click',function(){528 document.getElementById(show).style.display = "flex";529 document.getElementById(hide).style.display = "none"; 530 }); 531 } 532 goBack('two_back','usagestatus','property_space');533 goBack('three_back','property_space','property_built');534 goBack('four_back','property_built','condition');535 goBack('five_back','condition','balcony'); 536 goBack('six_back','property_built','desired_price');537 goBack('seven_back','desired_price','property_located');538 goBack('eight_back','property_located','last_step');539 goBack('commercialproperty_four_back','stepOne','commercialproperty');540 goBack('usagestatus_four_back','commercialproperty','usagestatus'); 541 542543 function goForward(select,show,hide){544 document.getElementById(select).addEventListener('click',function(){545 document.getElementById(show).style.display = "flex";546 document.getElementById(hide).style.display = "none"; 547 548 }); 549 } 550 goBack('one_next','property_built','property_space');551 goBack('two_next','desired_price','property_built'); 552 goBack('three_next','property_located','desired_price');553 goBack('four_next','last_step','property_located');554 goBack('size_two_next','property_built','property_size');555556557558559560 var property_space = document.getElementById("range");561 var sliderOutput = document.getElementById("amount"); 562 property_space.oninput = function(){563 sliderOutput.innerHTML = this.value;564 LivingSpace = this.value;565 console.log(LivingSpace);566 }567 var slider = document.getElementById("property_built_range");568 var output = document.getElementById("property_built_amount"); ...

Full Screen

Full Screen

personal.js

Source:personal.js Github

copy

Full Screen

1'use strict';2import React from 'react';3import ReactDOM from 'react-dom';4// import * as Common from './Common.js';5import {6 thisurl,7 serviceurl,8 ipurl,9 downDistance,10 setCookie,11 getCookie,12 delCookie,13 getURLPram,14 clearCookies,15 getCityIDByName,16 reminder,17 reminderSuccess,18 getLocalTime,19 checknull,20 MoneyConversion,21 MoneyValue,22 toDecimal,23 getMobilTime,24 plusZero,25 downloadurl26} from '../../js/common.js';27var per_name = "";28var Personal_mainBox = React.createClass({29 getInitialState: function() {30 $.ajax({ 31 url : serviceurl+"site/getUserInfo", //请求的Url32 type : "get", //提交方式33 dataType : "json", //请求的返回类型 这里为json 34 data : { },35 contentType : "application/json", //内容类型36 cache : false, 37 beforeSend:function(XMLHttpRequest){38 $("#login-loading-toast").css("display","block");39 }, //是否异步提交40 success : function(data){41 $("#login-loading-toast").css("display","none");42 console.log(JSON.stringify(data))43 if( data.status == "success"){44 delCookie("mobile");45 setCookie("mobile", data.data.mobile);46 $("#personal-name").text(checknull(data.data.fullname));47 $("#avatar").attr("src",serviceurl+data.data.avatar.substr(1));48 }else if( data.status == "redirect"){49 location.href = "../login.html?backurl=personal/personal.html";50 }else{51 reminder("请稍后再试");52 return ;53 }54 },55 error: function (XMLHttpRequest, textStatus, errorThrown) {56 $("#login-loading-toast").css("display","none");57 reminder(XMLHttpRequest.responseJSON.message);58 return ; 59 }60 });61 return {data: []};62 },63 userClick: function(){64 //个人信息修改65 per_name = $("#personal-name").text();66 if( per_name == "未登录" ){67 delCookie("gobackURL");68 setCookie("gobackURL", ipurl + "/personal.html", 30);69 location.href="../login.html";70 }else{71 delCookie("gobackURL");72 setCookie("gobackURL", ipurl + "/personal.html", 30);73 location.href="per_info.html";74 }75 },76 doctorClick: function(){77 //我的医生78 var per_name = $("#personal-name").text();79 if( per_name == "未登录" ){80 delCookie("gobackURL");81 setCookie("gobackURL", ipurl + "/personal.html", 30);82 location.href="../login.html";83 }else{84 delCookie("gobackURL");85 setCookie("gobackURL", ipurl + "/personal.html", 30);86 location.href="per_mydoc.html";87 }88 },89 yuyueClick: function(){90 //我的预约91 var per_name = $("#personal-name").text();92 if( per_name == "未登录" ){93 delCookie("gobackURL");94 setCookie("gobackURL", ipurl + "/personal.html", 30);95 location.href="../login.html";96 }else{97 delCookie("gobackURL");98 setCookie("gobackURL", ipurl + "/personal.html", 30);99 location.href="per_booking.html";100 }101 },102 orderClick: function(){103 //我的订单104 var per_name = $("#personal-name").text();105 if( per_name == "未登录" ){106 delCookie("gobackURL");107 setCookie("gobackURL", ipurl + "/personal.html", 30);108 location.href="../login.html";109 }else{110 delCookie("gobackURL");111 setCookie("gobackURL", ipurl + "/personal.html", 30);112 location.href="per_mypay.html";113 }114 },115 familyClick: function(){116 //家庭联系人117 var per_name = $("#personal-name").text();118 if( per_name == "未登录"){119 delCookie("gobackURL");120 setCookie("gobackURL", ipurl + "/personal.html", 30);121 location.href="../login.html";122 }else{123 delCookie("gobackURL");124 setCookie("gobackURL", ipurl + "/personal.html", 30);125 location.href="per_family.html";126 }127 },128 caseClick: function(){129 //家庭病例管理130 var per_name = $("#personal-name").text();131 if( per_name == "未登录" ){132 delCookie("gobackURL");133 setCookie("gobackURL", ipurl + "/personal.html", 30);134 location.href="../login.html";135 }else{136 delCookie("gobackURL");137 setCookie("gobackURL", ipurl + "/personal.html", 30);138 location.href="per_case.html";139 }140 },141 collectClick: function(){142 //我的收藏143 var per_name = $("#personal-name").text();144 if( per_name == "未登录" ){145 delCookie("gobackURL");146 setCookie("gobackURL", ipurl + "/personal.html", 30);147 location.href="../login.html";148 }else{149 delCookie("gobackURL");150 setCookie("gobackURL", ipurl + "/personal.html", 30);151 location.href="per_collect.html";152 }153 },154 setClick: function(){155 //设置156 var per_name = $("#personal-name").text();157 if( per_name == "未登录" ){158 delCookie("gobackURL");159 setCookie("gobackURL", ipurl + "/personal.html", 30);160 location.href="../login.html";161 }else{162 delCookie("gobackURL");163 setCookie("gobackURL", ipurl + "/personal.html", 30);164 location.href="per_setup.html";165 }166 },167 render: function() {168 return (169 <div>170 <div className="weui_cells weui_cells_access per_my_box pointer">171 <div className="weui_cell my_cell">172 <div className="weui_cell_hd per_avatar_box per-width8">173 <img src="" className="img-circle " width="75px" height="75px" id="avatar" ref="avatar"/>174 </div>175 <div className="weui_cell_bd weui_cell_primary per_avatar_tit" onClick={this.userClick}>176 <div >177 <span className="weui_media_title " id="personal-name" ref="personal-name"></span> 178 </div>179 <div className="weui_media_desc res-doc-con-text per-margintop5">我的积分:0</div> 180 </div>181 <div className="weui_cell_ft"></div>182 </div>183 </div>184 <div className="weui_cells weui_cells_access tmargin1 personal_paddingBox"> 185 <div className="weui_cell pointer" onClick={this.doctorClick}>186 <div className="weui_cell_hd">187 <img src="images/Group 4 Copy@2x.png" className="margin-right15 displayblock per-imggroup"/>188 </div>189 <div className="weui_cell_bd weui_cell_primary"><span className="weui_media_title ">我的医生</span></div>190 <div className="weui_cell_ft"></div>191 </div>192 193 <div className="weui_cell pointer" onClick={this.yuyueClick}>194 <div className="weui_cell_hd">195 <img src="images/Group 9 Copy 2@2x.png" className="margin-right15 displayblock per-imggroup"/>196 </div>197 <div className="weui_cell_bd weui_cell_primary"><span className="weui_media_title ">我的预约</span></div>198 <div className="weui_cell_ft"></div>199 </div>200 201 <div className="weui_cell pointer" onClick={this.orderClick}>202 <div className="weui_cell_hd">203 <img src="images/Group 10 Copy@2x.png" className="margin-right15 displayblock per-imggroup"/>204 </div>205 <div className="weui_cell_bd weui_cell_primary"><span className="weui_media_title ">我的订单</span></div>206 <div className="weui_cell_ft"></div>207 </div>208 209 <div className="weui_cell pointer" onClick={this.familyClick}>210 <div className="weui_cell_hd">211 <img src="images/Group 11 Copy@2x.png" className="margin-right15 displayblock per-imggroup"/>212 </div>213 <div className="weui_cell_bd weui_cell_primary"><span className="weui_media_title ">家庭联系人</span></div>214 <div className="weui_cell_ft"></div>215 </div>216 217 <div className="weui_cell pointer displaynone" onClick={this.caseClick}>218 <div className="weui_cell_hd">219 <img src="images/Group 12 Copy@2x.png" className="margin-right15 displayblock per-imggroup"/>220 </div>221 <div className="weui_cell_bd weui_cell_primary"><span className="weui_media_title ">家庭病例管理</span></div>222 <div className="weui_cell_ft"></div>223 </div>224 225 <div className="weui_cell pointer displaynone" onClick={this.collectClick}>226 <div className="weui_cell_hd">227 <img src="images/Group 13 Copy@2x.png" className="margin-right15 displayblock per-imggroup"/>228 </div>229 <div className="weui_cell_bd weui_cell_primary"><span className="weui_media_title ">我的收藏</span></div>230 <div className="weui_cell_ft"></div>231 </div>232 233 </div>234 235 <div className="weui_cells weui_cells_access pointer tmargin1 personal_paddingBox" onClick={this.setClick}>236 <div className="weui_cell">237 <div className="weui_cell_hd">238 <img src="images/Group 14 Copy@2x.png" className="margin-right15 displayblock per-imggroup"/>239 </div>240 <div className="weui_cell_bd weui_cell_primary"><span className="weui_media_title ">设置</span></div>241 <div className="weui_cell_ft"></div>242 </div>243 </div>244 <div id="loading-toast" ref="loading-toast" className="weui_loading_toast displaynone">245 <div className="weui_mask_transparent"></div>246 <div className="weui_toast">247 <div className="weui_loading">248 <div className="weui_loading_leaf weui_loading_leaf_0"></div>249 <div className="weui_loading_leaf weui_loading_leaf_1"></div>250 <div className="weui_loading_leaf weui_loading_leaf_2"></div>251 <div className="weui_loading_leaf weui_loading_leaf_3"></div>252 <div className="weui_loading_leaf weui_loading_leaf_4"></div>253 <div className="weui_loading_leaf weui_loading_leaf_5"></div>254 <div className="weui_loading_leaf weui_loading_leaf_6"></div>255 <div className="weui_loading_leaf weui_loading_leaf_7"></div>256 <div className="weui_loading_leaf weui_loading_leaf_8"></div>257 <div className="weui_loading_leaf weui_loading_leaf_9"></div>258 <div className="weui_loading_leaf weui_loading_leaf_10"></div>259 <div className="weui_loading_leaf weui_loading_leaf_11"></div>260 </div>261 <p className="weui_toast_content text-align" id="loading-toast-text">正在加载</p>262 </div>263 </div>264 <div id="success-toast" className="displaynone">265 <div className="weui_mask_transparent" id="success-toast-mask"></div>266 <div className="weui_toast">267 <i className="weui_icon_toast"></i>268 <p className="weui_toast_content text-align" id="success-toast-text"></p>269 </div>270 </div>271 <div id="fail-toast" className="displaynone">272 <div className="weui_mask_transparent" id="fail-toast-mask"></div>273 <div className="weui_toast_fail">274 <p className="text-align" id="fail-toast-text"></p>275 </div>276 </div>277 </div>278 );279 }280});281var Personal_tarBox = React.createClass({282 orderClick: function(){283 //我的订单284 var per_name = $("#personal-name").text();285 if( per_name == "未登录" ){286 delCookie("gobackURL");287 setCookie("gobackURL", ipurl + "/personal.html", 30);288 location.href="../login.html";289 }else{290 delCookie("gobackURL");291 setCookie("gobackURL", ipurl + "/personal.html", 30);292 location.href="per_mypay.html";293 }294 },295 yuyueClick: function(){296 //我的预约297 var per_name = $("#personal-name").text();298 if( per_name == "" || per_name == "未登录"){299 delCookie("gobackURL");300 setCookie("gobackURL", ipurl + "/personal.html", 30);301 location.href="../login.html";302 }else{303 delCookie("gobackURL");304 setCookie("gobackURL", ipurl + "/personal.html", 30);305 location.href="per_booking.html";306 }307 },308 setClick: function(){309 //设置310 var per_name = $("#personal-name").text();311 if( per_name == "" || per_name == "未登录"){312 delCookie("gobackURL");313 setCookie("gobackURL", ipurl + "/personal.html", 30);314 location.href="../login.html";315 }else{316 delCookie("gobackURL");317 setCookie("gobackURL", ipurl + "/personal.html", 30);318 location.href="per_setup.html";319 }320 },321 mainClick: function(){322 //主页323 delCookie("gobackURL");324 setCookie("gobackURL", ipurl + "/personal.html", 30);325 location.href="per_index.html";326 },327 messageClick: function(){328 //消息点击329 per_name = $("#personal-name").text();330 if( per_name == "" || per_name == "未登录"){331 delCookie("gobackURL");332 setCookie("gobackURL", ipurl + "/personal.html", 30);333 location.href="../login.html";334 }else{335 if(confirm("该功能需要下载app,是否下载?")){336 //消息点击337 delCookie("gobackURL");338 setCookie("gobackURL", ipurl + "/personal.html", 30);339 location.href=downloadurl;340 }else{341 return;342 }343 }344 },345 meClick: function(){346 //我点击事件347 per_name = $("#personal-name").text();348 if( per_name == "" || per_name == "未登录"){349 delCookie("gobackURL");350 setCookie("gobackURL", ipurl + "/personal.html", 30);351 location.href="../login.html";352 }else{353 delCookie("gobackURL");354 setCookie("gobackURL", ipurl + "/personal.html", 30);355 location.href="personal.html";356 }357 },358 render: function() {359 return (360 <div className="weui_tabbar">361 <div className="weui_tabbar_item per-foot-nav pointer" onClick={this.mainClick}>362 <div className="weui_tabbar_icon">363 <img src="images/ic_home_main.png" className="height-auto"/>364 </div>365 <p className="weui_tabbar_label">牙艺</p>366 </div>367 <div className="weui_tabbar_item per-foot-nav pointer" onClick={this.orderClick}>368 <div className="weui_tabbar_icon">369 <img src="images/ic_home_pay.png" className="height-auto"/>370 </div>371 <p className="weui_tabbar_label">支付</p>372 </div>373 <div className="weui_tabbar_item per-foot-nav pointer" onClick={this.messageClick}>374 <div className="weui_tabbar_icon">375 <img src="images/ic_home_notice.png" className="height-auto"/>376 </div>377 <p className="weui_tabbar_label">消息</p>378 </div>379 <div className="weui_tabbar_item per-foot-nav pointer" onClick={this.meClick}>380 <div className="weui_tabbar_icon">381 <img src="images/ic_home_me_checked.png" className="height-auto"/>382 </div>383 <p className="weui_tabbar_label">我</p>384 </div>385 </div>386 );387 }388});389ReactDOM.render(390 <Personal_mainBox />,391 document.getElementById('content')392);393ReactDOM.render(394 <Personal_tarBox />,395 document.getElementById('downTar')...

Full Screen

Full Screen

Settings.js

Source:Settings.js Github

copy

Full Screen

...116 };117 },118 handleSubmitEditing: function() {119 this.props.addUser(this.state.newUserName);120 this.props.goBack();121 },122 render: function () {123 const {124 goBack,125 } = this.props;126 return (127 <SettingsWrapper goBack={goBack} backButtonText="Cancel">128 <AppText style={styles.headingText}>Hi! What's your name?</AppText>129 <TextInput130 autoCapitalize='words'131 autoFocus={true}132 returnKeyType='done'133 style={styles.input}134 value={this.state.newUserName}135 onChangeText={(text) => {136 this.setState({137 newUserName: text,138 });139 }}140 onSubmitEditing={this.handleSubmitEditing}141 />142 <Button143 style={styles.submitButton}144 text="Save!"145 onPress={this.handleSubmitEditing}146 />147 </SettingsWrapper>148 );149 },150});151const ChangeUserName = React.createClass({152 propTypes: {153 changeUserName: React.PropTypes.func.isRequired,154 goBack: React.PropTypes.func.isRequired,155 user: React.PropTypes.object.isRequired,156 },157 getInitialState: function() {158 return {159 userName: this.props.user.name,160 };161 },162 componentWillReceiveProps: function(newProps) {163 this.setState({164 userName: newProps.user.name,165 });166 },167 handleSubmitEditing: function() {168 this.props.changeUserName(this.state.userName);169 this.props.goBack();170 },171 render: function () {172 const {173 goBack,174 } = this.props;175 return (176 <SettingsWrapper goBack={goBack} backButtonText="Cancel">177 <AppText style={styles.headingText}>178 What's your new name?179 </AppText>180 <TextInput181 autoCapitalize='words'182 autoFocus={true}183 returnKeyType='done'...

Full Screen

Full Screen

App.js

Source:App.js Github

copy

Full Screen

...56 headerTitleAlign: 'center',57 headerLeft: () => (58 // <TouchableOpacity59 // onPress={() => {60 // navigation.goBack()61 // }}62 // >63 // <Text>Go Back</Text>64 // </TouchableOpacity>65 <Button66 title="Go back"67 onPress={() => {68 navigation.goBack()69 }}70 />71 )72 })}73 />74 <Pharm.Screen name="Meds" component={PharmPage}75 options={{headerShown: false}}76 />77 <Pharm.Screen name="Stores" component={Stores}78 options={({ navigation, route }) => ({79 headerStyle: styles.header,80 headerTitle: "Stores",81 headerTitleAlign: 'center',82 headerLeft: () => (83 // <TouchableOpacity84 // onPress={() => {85 // navigation.goBack()86 // }}87 // >88 // <Text>Go Back</Text>89 // </TouchableOpacity>90 <Button91 title="Go back"92 onPress={() => {93 navigation.goBack()94 }}95 />96 )97 })}98 />99 <Pharm.Screen name="Log" component={Log}100 options={{headerShown: false}}101 />102 <Pharm.Screen name="Change" component={ChangeStores}103 options={({ navigation, route }) => ({104 headerStyle: styles.header,105 headerTitle: "Change Stores",106 headerTitleAlign: 'center',107 headerLeft: () => (108 // <TouchableOpacity109 // onPress={() => {110 // navigation.goBack()111 // }}112 // >113 // <Text>Go Back</Text>114 // </TouchableOpacity>115 <Button116 title="Go back"117 onPress={() => {118 navigation.goBack()119 }}120 />121 )122 })}123 />124 </Pharm.Navigator>125 )126}127function MyNurse() {128 return (129 <Nurse.Navigator>130 <Nurse.Screen name="Registration" component={Registration}131 options={({ navigation, route }) => ({132 headerStyle: styles.header,133 headerTitleAlign: 'center',134 headerLeft: () => (135 // <TouchableOpacity136 // onPress={() => {137 // navigation.goBack()138 // }}139 // >140 // <Text>Go Back</Text>141 // </TouchableOpacity>142 <Button143 title="Go back"144 onPress={() => {145 navigation.goBack()146 }}147 />148 )149 })}150 />151 </Nurse.Navigator>152 )153}154function MyDoctor() {155 return (156 <Doctor.Navigator>157 <Doctor.Screen name="PatientSearch" component={PatientSearch}158 options={({ navigation, route }) => ({159 headerStyle: styles.header,160 headerTitle: "Search",161 headerTitleAlign: 'center',162 headerLeft: () => (163 // <TouchableOpacity164 // onPress={() => {165 // navigation.goBack()166 // }}167 // >168 // <Text>Go Back</Text>169 // </TouchableOpacity>170 <Button171 title="Go back"172 onPress={() => {173 navigation.goBack()174 }}175 />176 )177 })}178 />179 <Doctor.Screen name="Meds" component={DoctorPage}180 options={({ navigation, route }) => ({181 headerStyle: styles.header,182 headerTitle: "New Complaint",183 headerTitleAlign: 'center',184 headerLeft: () => (185 // <TouchableOpacity186 // onPress={() => {187 // navigation.goBack()188 // }}189 // >190 // <Text>Go Back</Text>191 // </TouchableOpacity>192 <Button193 title="Go back"194 onPress={() => {195 navigation.goBack()196 }}197 />198 )199 })}200 />201 <Doctor.Screen name="History" component={History}202 options={({ navigation, route }) => ({203 headerStyle: styles.header,204 headerTitle: "History",205 headerTitleAlign: 'center',206 headerLeft: () => (207 // <TouchableOpacity208 // onPress={() => {209 // navigation.goBack()210 // }}211 // >212 // <Text>Go Back</Text>213 // </TouchableOpacity>214 <Button215 title="Go back"216 onPress={() => {217 navigation.goBack()218 }}219 />220 )221 })}222 />223 <Doctor.Screen name="Log" component={Log}224 options={{headerShown: false}}225 />226 <Doctor.Screen name="Stores" component={Stores}227 options={({ navigation, route }) => ({228 headerStyle: styles.header,229 headerTitle: "Stores",230 headerTitleAlign: 'center',231 headerLeft: () => (232 // <TouchableOpacity233 // onPress={() => {234 // navigation.goBack()235 // }}236 // >237 // <Text>Go Back</Text>238 // </TouchableOpacity>239 <Button240 title="Go back"241 onPress={() => {242 navigation.goBack()243 }}244 />245 )246 })}247 />248 <Doctor.Screen name="Change" component={ChangeStores}249 options={({ navigation, route }) => ({250 headerStyle: styles.header,251 headerTitle: "Change Stores",252 headerTitleAlign: 'center',253 headerLeft: () => (254 // <TouchableOpacity255 // onPress={() => {256 // navigation.goBack()257 // }}258 // >259 // <Text>Go Back</Text>260 // </TouchableOpacity>261 <Button262 title="Go back"263 onPress={() => {264 navigation.goBack()265 }}266 />267 )268 })}269 />270 <Doctor.Screen name="ComplaintPage" component={ComplaintPage}271 options={{headerShown: false}}272 />273 <Doctor.Screen name="Calendar" component={Calendar} 274 options={({ navigation, route }) => ({275 headerStyle: styles.header,276 headerTitle: "Calendar",277 headerTitleAlign: 'center',278 headerLeft: () => (279 // <TouchableOpacity280 // onPress={() => {281 // navigation.goBack()282 // }}283 // >284 // <Text>Go Back</Text>285 // </TouchableOpacity>286 <Button287 title="Go back"288 onPress={() => {289 navigation.goBack()290 }}291 />292 )293 })}294 />295 </Doctor.Navigator>296 )297}298export default class App extends React.Component {299 render() {300 return (301 <NavigationContainer>302 <MyLogin />303 </NavigationContainer>...

Full Screen

Full Screen

index.js

Source:index.js Github

copy

Full Screen

1import React from 'react';2import {createStackNavigator} from '@react-navigation/stack';3import {IconButton, Subheading} from 'react-native-paper';4import BackButton from '../../../custom/BackButton';5const Stack = createStackNavigator();6import Forms from '../../../../screens/Dashboard/More/Forms';7import FormNewMember from '../../../../screens/Dashboard/More/Forms/FormNewMember';8import FormChildDedication from '../../../../screens/Dashboard/More/Forms/FormChildDedication';9import FormConnection from '../../../../screens/Dashboard/More/Forms/FormConnection';10import FormVolunteer from '../../../../screens/Dashboard/More/Forms/FormVolunteer';11import FormFeedback from '../../../../screens/Dashboard/More/Forms/FormFeedback';12import FormSurvey from '../../../../screens/Dashboard/More/Forms/FormSurvey';13import FormMembership from '../../../../screens/Dashboard/More/Forms/FormMembership';14const Form = () => {15 return (16 <Stack.Navigator initialRouteName="FormScreen">17 <Stack.Screen18 name="FormScreen"19 options={({route, navigation: {goBack}}) => ({20 headerLeft: () => <BackButton goBack={goBack} />,21 headerTitle: () => <Subheading>Forms</Subheading>,22 })}23 component={Forms}24 />25 <Stack.Screen26 name="FormNewMemberScreen"27 options={({route, navigation: {goBack}}) => ({28 headerLeft: () => <BackButton goBack={goBack} />,29 headerTitle: () => <Subheading>New Member Form</Subheading>,30 })}31 component={FormNewMember}32 />33 <Stack.Screen34 name="FormChildDedicationScreen"35 options={({route, navigation: {goBack}}) => ({36 headerLeft: () => <BackButton goBack={goBack} />,37 headerTitle: () => <Subheading>Child Dedication Form</Subheading>,38 })}39 component={FormChildDedication}40 />41 <Stack.Screen42 name="FormConnection"43 options={({route, navigation: {goBack}}) => ({44 headerLeft: () => <BackButton goBack={goBack} />,45 headerTitle: () => <Subheading>Connection Card</Subheading>,46 })}47 component={FormConnection}48 />49 <Stack.Screen50 name="FormVolunteer"51 options={({route, navigation: {goBack}}) => ({52 headerLeft: () => <BackButton goBack={goBack} />,53 headerTitle: () => <Subheading>Volunteer Sign-Up</Subheading>,54 })}55 component={FormVolunteer}56 />57 <Stack.Screen58 name="FormFeedback"59 options={({route, navigation: {goBack}}) => ({60 headerLeft: () => <BackButton goBack={goBack} />,61 headerTitle: () => <Subheading>Feedback</Subheading>,62 })}63 component={FormFeedback}64 />65 <Stack.Screen66 name="FormSurvey"67 options={({route, navigation: {goBack}}) => ({68 headerLeft: () => <BackButton goBack={goBack} />,69 headerTitle: () => <Subheading>Survey</Subheading>,70 })}71 component={FormSurvey}72 />73 <Stack.Screen74 name="FormMembership"75 options={({route, navigation: {goBack}}) => ({76 headerLeft: () => <BackButton goBack={goBack} />,77 headerTitle: () => <Subheading>Membership</Subheading>,78 })}79 component={FormMembership}80 />81 </Stack.Navigator>82 );83};...

Full Screen

Full Screen

HomePubilcPage.js

Source:HomePubilcPage.js Github

copy

Full Screen

...33 const {state,goBack,navigate}=this.props.navigation34 //根据传值的不同渲染出不同的组件35 if(state.params.id===1){36 return <FaultReportPage37 goBack={()=>goBack()}38 navigate={navigate}39 />40 }else if(state.params.id===2){41 return <ServiceRequestPage42 goBack={()=>goBack()}43 navigate={navigate}44 />45 }else if(state.params.id===3){46 return <ConstructionApplicationPage47 goBack={()=>goBack()}48 navigate={navigate}49 />50 }else if(state.params.id===4){51 return <AssetsViewPage52 goBack={()=>goBack()}53 navigate={navigate}54 />55 }else if(state.params.id===5){56 return <ShiftWorkPage57 goBack={()=>goBack()}58 navigate={navigate}59 />60 }else if(state.params.id===6){61 return <PatrolCheckPage62 goBack={()=>goBack()}63 navigate={navigate}64 />65 }else if(state.params.id===7){66 return <KnowledgeBasePage67 goBack={()=>goBack()}68 navigate={navigate}69 />70 }else if(state.params.id===8){71 return <PUEViewPage72 goBack={()=>goBack()}73 navigate={navigate}74 />75 }else if(state.params.id===9){76 return <EnergyEfficiencyPage77 goBack={()=>goBack()}78 navigate={navigate}79 />80 }else if(state.params.id===10){81 return <WeeklyPage82 goBack={()=>goBack()}83 navigate={navigate}84 />85 }else if(state.params.id===11){86 return <MonthlyPage87 goBack={()=>goBack()}88 navigate={navigate}89 />90 }else if(state.params.id===12){91 return <AnnualReportPage92 goBack={()=>goBack()}93 navigate={navigate}94 />95 }else if(state.params.id===13){96 return <CapacityViewPage97 goBack={()=>goBack()}98 navigate={navigate}99 />100 }else if(state.params.id===14){101 return <MorePage102 goBack={()=>goBack()}103 navigate={navigate}104 />105 }106 }107}108const styles = StyleSheet.create({...

Full Screen

Full Screen

remote.js

Source:remote.js Github

copy

Full Screen

1function remote() {2 var remote = {};3 var xmlHttp = null;4 // 创建xmlHttp5 try {6 xmlHttp = new XMLHttpRequest();7 } catch (e) {8 try {9 xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");10 } catch (e) {11 try {12 xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");13 } catch (e) {14 return null;15 }16 }17 }18 if(xmlHttp)19 // remote执行前执行20 remote.before = function(goback, params) {21 if(goback) {22 goback(params);23 }24 };25// remote执行后26 remote.after = function(goback, params) {27 if(goback) {28 goback(params);29 }30 }31// remote执行体32 remote.run = function(url, params, goback, methods) {33 remote.before();34 xmlHttp.open(methods, url, true);35 xmlHttp.setRequestHeader("Content-Type", "application/json");36 // xmlHttp.setRequestHeader('X-Custom-Header', 'application/json');37 // xmlHttp.withCredentials = true;38 // var temp = {name:"wang",passoword:"password"};39 xmlHttp.send(params);40 xmlHttp.onreadystatechange = function() {41 if(xmlHttp.readyState == 4 && xmlHttp.status == 200) {42 remote.after();43 // console.log("json: "+xmlHttp.responseText)44 goback(xmlHttp.responseText);45 }46 };47 }48// 如果xml存在初始化remote49 if(xmlHttp) {50 remote.get = function(url, params, goback) {51 remote.run(url,null, goback, 'GET');52 };53 remote.post = function(url, params, goback) {54 remote.run(url, params, goback, 'POST');55 }56 }57 return remote;...

Full Screen

Full Screen

BackButton.js

Source:BackButton.js Github

copy

Full Screen

1var React = require('react');2module.exports = React.createClass({3 goBack() {4 var goBack = this.props.goBack;5 if (!goBack || !goBack()) {6 app.goBack();7 }8 },9 render() {10 var haveBackButton = this.props.goBack!==false;11 if (!haveBackButton) {12 return (13 <div className="left">14 </div>15 )16 }17 if (app.params.material) {18 return (19 <div className="left">20 <a...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const { goBack } = require('@playwright/test/lib/server/frames');2(async () => {3 const browser = await chromium.launch();4 const context = await browser.newContext();5 const page = await context.newPage();6 await page.click('text=Docs');7 await page.click('text=Guides');8 await page.click('text=Test runner');9 await page.click('text=Playwright Test');10 await page.click('text=API');11 await page.click('text=goBack');12 await goBack(page);13 await page.click(

Full Screen

Using AI Code Generation

copy

Full Screen

1await page.goBack();2await page.goBack();3await page.goBack();4await page.goBack();5await page.goBack();6await page.goBack();7await page.goBack();8await page.goBack();9await page.goBack();10await page.goBack();

Full Screen

Playwright tutorial

LambdaTest’s Playwright tutorial will give you a broader idea about the Playwright automation framework, its unique features, and use cases with examples to exceed your understanding of Playwright testing. This tutorial will give A to Z guidance, from installing the Playwright framework to some best practices and advanced concepts.

Chapters:

  1. What is Playwright : Playwright is comparatively new but has gained good popularity. Get to know some history of the Playwright with some interesting facts connected with it.
  2. How To Install Playwright : Learn in detail about what basic configuration and dependencies are required for installing Playwright and run a test. Get a step-by-step direction for installing the Playwright automation framework.
  3. Playwright Futuristic Features: Launched in 2020, Playwright gained huge popularity quickly because of some obliging features such as Playwright Test Generator and Inspector, Playwright Reporter, Playwright auto-waiting mechanism and etc. Read up on those features to master Playwright testing.
  4. What is Component Testing: Component testing in Playwright is a unique feature that allows a tester to test a single component of a web application without integrating them with other elements. Learn how to perform Component testing on the Playwright automation framework.
  5. Inputs And Buttons In Playwright: Every website has Input boxes and buttons; learn about testing inputs and buttons with different scenarios and examples.
  6. Functions and Selectors in Playwright: Learn how to launch the Chromium browser with Playwright. Also, gain a better understanding of some important functions like “BrowserContext,” which allows you to run multiple browser sessions, and “newPage” which interacts with a page.
  7. Handling Alerts and Dropdowns in Playwright : Playwright interact with different types of alerts and pop-ups, such as simple, confirmation, and prompt, and different types of dropdowns, such as single selector and multi-selector get your hands-on with handling alerts and dropdown in Playright testing.
  8. Playwright vs Puppeteer: Get to know about the difference between two testing frameworks and how they are different than one another, which browsers they support, and what features they provide.
  9. Run Playwright Tests on LambdaTest: Playwright testing with LambdaTest leverages test performance to the utmost. You can run multiple Playwright tests in Parallel with the LammbdaTest test cloud. Get a step-by-step guide to run your Playwright test on the LambdaTest platform.
  10. Playwright Python Tutorial: Playwright automation framework support all major languages such as Python, JavaScript, TypeScript, .NET and etc. However, there are various advantages to Python end-to-end testing with Playwright because of its versatile utility. Get the hang of Playwright python testing with this chapter.
  11. Playwright End To End Testing Tutorial: Get your hands on with Playwright end-to-end testing and learn to use some exciting features such as TraceViewer, Debugging, Networking, Component testing, Visual testing, and many more.
  12. Playwright Video Tutorial: Watch the video tutorials on Playwright testing from experts and get a consecutive in-depth explanation of Playwright automation testing.

Run Playwright Internal automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful