function search_input_value(e){
if (event.target.value.includes('*')){
var all = document.querySelectorAll('#items2 tr');
if (all.length){
for (var i=0, max=all.length; i < max; i++) {
all[i].remove();
}
}
event.target.value = event.target.value.slice(0, -1);
document.querySelectorAll('#btn_search')[0].click();
event.target.value = '';
var items2 = document.querySelectorAll('#items2');
var observer = new MutationObserver(function(mutationsList) {
for(var mutation of mutationsList) {
if (mutation.type === 'childList') {
var all = document.querySelectorAll('#items2');
for (var i=0, max=all.length; i < max; i++) {
console.log(all[i].querySelectorAll('.tovar_name')[0].click());
}
}
}
});
observer.observe(items2[0], { attributes: false, childList: true, subtree: false });
}
}
function search_input_value(e){
if (event.target.value.includes('*')){
event.target.value = event.target.value.slice(0, -1);
document.querySelectorAll('#btn_search')[0].click();
event.target.value = '';
var all = document.querySelectorAll('#items2');
for (var i=0, max=all.length; i < max; i++) {
console.log(all[i].querySelectorAll('.tovar_name')[0])
}
}}
services:
chrome:
image: selenium/node-chrome:beta
shm_size: 2gb
depends_on:
- selenium-hub
environment:
- SE_EVENT_BUS_HOST=selenium-hub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
selenium-hub:
image: selenium/hub:latest
container_name: selenium-hub
ports:
- "4442:4442"
- "4443:4443"
- "4444:4444"