Skip to content

Instantly share code, notes, and snippets.

let scriptToExecute =
"var performance = window.performance || window.mozPerformance || window.msPerformance || window.webkitPerformance || {}; var network = performance.getEntries() || {}; return network;";
const selectCompaniesLocated = await driver.wait(until.elementLocated(By.xpath("//div[@id='modalAddCompany']/div[@role='document']//form[@role='form']/div[@class='panel-body']/div/div[1]/div/div//select[@name='5']/option[@value='6']")), TIMEOUT);
const selectCompaniesVisible = await driver.wait(until.elementIsVisible(selectCompaniesLocated), TIMEOUT);
selectCompaniesVisible.click();
<!-- Модальное окно добавления рамки -->
<div class="modal fade" id="modalAddFrame"
role="dialog" aria-labelledby="historyLabel">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span>&times;</span></button>
<h4 class="modal-title" id="historyLabel"><i class="fa fa-list"></i> Добавить рамку</h4>
</div>
<div class="panel-body">
$("body").on('show.bs.modal', '#modalAddFrame', function() {
$('#tableModalFrames').DataTable({
"retrieve": true,
"destroy": true,
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"info": true,
"autoWidth": true,
// My example
rows.forEach(element => {
let json = JSON.parse(element.template_source);
for (let key in json) {
if(key === 'details') {
json[key].forEach(element => {
if(element.level !== undefined) {
console.log(element.level);
}
})
fs.readFileSync("DB.txt");
let lk = res.rows.filter((result) => {
return result.app_version === "lk";
});
it.only("create cache file", () => {
let cacheResult = {};
const query3 = "SELECT * FROM profile_systems";
const newCursor = client.query(new Cursor(query3));
newCursor.read(20, (err, rowsTop) => {
if (err) {
throw err;
}
test(err => {
try {
function inherit(child, parent) {
var Temp = function () {};
Temp.prototype = parent.prototype;
child.prototype = new Temp();
}
inherit(F2, F);
function inherit(child, parent) {
child.prototype = Object.create(parent.prototype);
function pushUniqueObject(...arrays) {
let result = [];
let uniqueId = [];
for(let array of arrays) {
if(array.length !== 0) {
for (let object of array) {
if(object.child_id !== undefined && !uniqueId[object.child_id]) {
uniqueId[object.child_id] = true;
result.push(object);
}
const isIterable = object =>
object != null && typeof object[Symbol.iterator] === 'function';