以下Selenium xpath
之间有什么区别.//a[@id="name"]
和
$("#test").select2({
ajax: {
url: "URL",
dataType: 'json',
delay: 250,
data: function(params) {
return {
searchTerm: params.term, // search term
page: params.page
};
},
processResults: function(data, params) {
var d = [];
for (var i = data.length - 1; i >= 0; i--) {
d.push({
id: data[i].hostname,
text: data[i].hostname
});
}
params.page = params.page || 0;
return {
results: d,
pagination: {
more: (1 + params.page) < data.totalPages
}
};
},
cache: true
},
allowClear: true,
escapeMarkup: function(markup) {
return markup;
},
multiple: true,
maximumSelectionLength: 22,
placeholder: "Select fruits...",
templateResult: formatRepo,
templateSelection: formatRepoSelection
});
function formatRepoSelection(data) {
return data.text;
}
function formatRepo(data) {
if (data.loading) return data.text;
return data.text;
}
在第二个xpath前面添加。(点)有什么用?
先谢谢