I cannot seem to solve, I am trying add an image to the FB marketplace with Zennoposter and cannot. I have exhausted all possibilities but nothing will click the Add Photos button inside of FB marketplace.
/// JS VERSION
function wait(ms){
var d = new Date();
var d2 = null;
do {
d2 = new Date();
}
while(d2-d < ms);
}
///
popWindows = document.querySelectorAll("div[role='dialog']");
for (q = 0; q < popWindows.length; q++) {
if(popWindows[q].innerHTML.indexOf('2007 Infiniti M35 X Technology Package : AWD Sedan : Fully Loaded') != -1 ){
console.log('insidePop');
myIMGS = popWindows[q].querySelectorAll("div[data-testid='media-attachment-photo']");
//console.log(myIMGS.length);
for (i = 0; i < myIMGS.length; i++) {
//return myIMGS.length;
myIMGS.getElementsByTagName("button")[0].click();
}
wait(2000);
clickthis = popWindows[q].querySelector("input[title='Choose a file to upload']");
console.log(clickthis.length);
clickthis.click();
}
}
/// Even Tried C# with Coordinates
instance.ActiveTab.MouseMove(200, 250, 155, 602, true);
instance.ActiveTab.MouseClick(155, 602, "left", "click");
/// Manually works though
If I manually use my mouse to click the add photos button it works
What Gives?
/// JS VERSION
function wait(ms){
var d = new Date();
var d2 = null;
do {
d2 = new Date();
}
while(d2-d < ms);
}
///
popWindows = document.querySelectorAll("div[role='dialog']");
for (q = 0; q < popWindows.length; q++) {
if(popWindows[q].innerHTML.indexOf('2007 Infiniti M35 X Technology Package : AWD Sedan : Fully Loaded') != -1 ){
console.log('insidePop');
myIMGS = popWindows[q].querySelectorAll("div[data-testid='media-attachment-photo']");
//console.log(myIMGS.length);
for (i = 0; i < myIMGS.length; i++) {
//return myIMGS.length;
myIMGS.getElementsByTagName("button")[0].click();
}
wait(2000);
clickthis = popWindows[q].querySelector("input[title='Choose a file to upload']");
console.log(clickthis.length);
clickthis.click();
}
}
/// Even Tried C# with Coordinates
instance.ActiveTab.MouseMove(200, 250, 155, 602, true);
instance.ActiveTab.MouseClick(155, 602, "left", "click");
/// Manually works though
If I manually use my mouse to click the add photos button it works
What Gives?
Последнее редактирование: