i have a chrome extension that uses information from ebay website.
now i want to update tracking numbers using the extension,
but when ever i open the document where i want to update the tracking of an order all the elements
there are hidden and i can't access anything,
is this something ebay does on purpose to avoid us from having access there?
or is it just something that i can overcome?
added the function that get the doc page:
var carrier = "USPS";
let TrackCollection = new Map();
var allLines = trackingTxt.split("\n");
for (var i=0;i< allLines.length;i++)
{
var splitLine = allLines[i].split("\t");
if (splitLine.length == 2)
{
TrackCollection.set(splitLine[0],splitLine[1]);
}
}
for (var j=0; j<elOrders.length; j++)
{
if(elOrders[j].getAttribute("class").startsWith("order-info"))
{
var orderNum = elOrders[j].getElementsByClassName("order-details")[0].innerText;
if (orderNum)//not null
{
trackingNumber = TrackCollection.get(orderNum);
if(trackingNumber)//not null
{
var par = elOrders[j+1].getElementsByClassName("item-tracking");
doc = getDocPage(par[0].getElementsByTagName("a")[0].getAttribute("href"));
var textBox = doc.getElementsByClassName("textbox textbox--small");
textBox[0].value = trackingNumber;
textBox[1].value = carrier;
.
.
.
function getDocPage(href)
{
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", href, false); // false = the request is synchronous
xmlHttp.send(null);
var doc = new DOMParser().parseFromString(xmlHttp.responseText, 'text/html');
}
Thank you