写脚本的一些思路...only for mine

"There is an error, need to manually testing"


function select_an_option_popup($gridTitle,$winTitle,$index,){
	var $gird_temp = _div("/z-grid-body/",_near(_div({className:"/cbx-section-title/",sahiText:"/"+$gridTitle+"/"})));
	var $popup_temp = _div("/z-grid-body/",_near(_div({className:"/z-window-modal-header/",sahiText:"/"+$winTitle+"/"})));
	var $index_Id = condition_index("ID")
	var $index_Market = condition_index("Market");
	var $index_Channel = condition_index("Channel");
	var $selected_record = _getText(_row("/z-row/["+$index+"]",_in($popup_temp)));
	var $exist_code = new Array();
	for(var $i = 0; $i < parseInt(_count("_row","/z-row/",_in($gird_temp)));$i ++){
		$exist_code.push({"ID":_getText(_cell($index_id,_in("/z-row/["+$i+"]",_in($gird_temp)))),"Market":_getText(_cell($index_Market,_in("/z-row/["+$i+"]",_in($gird_temp))))),
						  "Channel":_getText(_cell($index_Channel,_in("/z-row/["+$i+"]",_in($gird_temp)))))});
	}
	for(var $i =0; $i < $exist_code.length;$i++){
		if($selected_record.indexOf($exist_code[$i].ID)!= -1 || $selected_record.indexOf($exist_code[$i].Market)!= -1 ||
	   	   $selected_record.indexOf($exist_code[$i].Channel)!= -1){
		       $index = parseInt((_count("_row","/z-row/",_in($popup_temp))-1)*Math.random());
		}
		$selected_record = _getText(_row("/z-row/["+$index+"]",_in($popup_temp)));		
	}
	_click($select_record);
}

Country of Destination;Port of Discharge;Final Destination   其中一个不一样就可以了!不用三个全部不一样



Customer Final Destinations: The combination of Customer/POD/Final Destination should be unique in the section.



var $userInfo = new Array();
    $userInfo[0] =   {"name":"jame", "age":"22"};
 $userInfo[1] =   {"name":"Ram", "age":"18"};
$userInfo[2] =   {"name":"Ram1", "age":"182"};
$userInfo.push({"name":"jamesssss", "age":"2s2"});
var $userName = $userInfo[0]["name"];
var $userAge = $userInfo[1]["age"];



$userInfo[0]["name"]+$userInfo[1]["name"]+$userInfo[2]["name"]+ $userInfo[0]["age"]+ $userInfo[1]["age"]+ $userInfo[2]["age"];
jameRamRam12218182



$userInfo[3]["name"]+ $userInfo[3]["age"];
jamesssss2s2

$userInfo[3].name
jamesssss

  

转载于:https://www.cnblogs.com/Testing-Janeness-Liu/p/4031649.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值