How to upload an image on eBay via Selenium - java

I'm trying to automate listings on eBay (I know I can use API but I prefer doing it with Selenium) but I'm stuck trying to upload an image to eBay.
The URL I am viewing is:
http://cgi5.ebay.com/ws/eBayISAPI.dll?LikeThisListing&cpg=20&aid=1&from=wn&sid=475543545921&itemid=290714408232&cat1=43537
You can replace 475543545921 with any item number. You'll need to login to your account to view this page I believe.
You can upload images by clicking on "Add/edit photos" or "Click to add photos"
Using the following syntax does not work:
WebElement fileInput = driver.findElement(By.xpath(".//*[#id='ID']"));
fileInput.sendKeys("C:\\PATH");
Does anyone know how I could upload images on eBay aside from using their API?

Related

How to upload a 360º photo to Facebook using restfb?

I have a 360º jpeg file that works fine if upload to Facebook using its regular page.
When I try to upload the same file using restfb the image becomes "flat".
Does anybody know something specific to make it work with restfb?
You simply need to add the additional parameter allow_spherical_photo=true.

How to upload the PDF, XSL and TXT files in Google Drive

Hi I'm Developing the Android app to upload the file in Google drive, If the user to enter the gmail user id or already android gmail account for selection based on the user selection, How can i achieve the issue,
Please update the issue, Files are created devices itself and that file to directly upload the google drive.
You can use Google's Drive APIs, just follow the steps here and it should work. I am using it for a C# program and it works good.
Umm I see that there are no explanations on how to upload a file. Check this link after you complete the authentication and the other stuff in the first link, I think it might help.

How to extract thumbnail of a website in Java?

I want to extract thumbnail of a website using java.javascript or jquery but not using PHP or .Net.Can I do it because i Surfed on Google and they show that this can only be possible using Java.I have an input box where user will enter the website and I want to show the thumbnail of a website in the div?Is there an plugin or API through which I can do it?
To get the thumbnail of a website using Java you can use this free API
http://free.pagepeeker.com/v2/thumbs.php?size=x&url=google.com
Just replace google with your respective link and you will get the thumbnail of your respective website.

Generate a png or jpeg image of a webpage using some java jar

I have a Java EE application running and on one of its webpage, I want to add a functionality that whenever the user presses a certain button, I get an image of ONLY the webpage which is currently displayed on the user end.
I have tried using a library for the purpose http://code.google.com/p/java-html2image/wiki/HtmlImageGenerator
My code using the above library is:
HtmlImageGenerator imageGenerator = new HtmlImageGenerator();
imageGenerator.loadUrl("http://localhost:8080/scheduler/xxx")
imageGenerator.getLinks();
imageGenerator.saveAsImage("sos.png");
It does generate an image but my page contains a lot of css and colors but the image which is generated does not seem to add that color and infact produces a blue screen with almost no css applied.
Can someone help in the code or suggest any alternative libraries for the same?
How about using jQuery or java script, on googling a bit I found the following two existing posts in stackoverflow
generating a screenshot of a website using jquery
Take a screenshot of a webpage with JavaScript?

Java, swt and web

How to retrieve all images from a site. I want to make desktop application which show images of a cars received by a web site.
You will need to do is get the HTML from the site you're connecting to and search for all the <img> tags, parse the url out of them, and then loop through each url, connect to it, download the image, then use your app to view the images.
Google is loaded with examples how to download files from urls.

Categories

Resources