I'm automating a web site; entire website is in html except few 'Copy' buttons are in flash. As there is no element for that button, I couldn't verify it's functionality (I have to check whether it's clickable & clicking on it results into coping contents in clipboard). Is there any way, we can automate that button's functionality by adding java script snippet or something?
I'm using ruby api's for automating the site.
Related
This seems to be by design as far as I can tell. Selenium can see the initially loaded HTML, but not the HTML after it's been massaged. I've tried IE, Chrome and PhantomJS and they all show the same behavior. So does the built-in Chrome debugger, until you inspect an element on the page, you can't query any of the rendered HTML.
I'm looking for any suggestions about how to scrape the web page. The only option I see right now is finding the chrome process, triggering the inspector, clicking inside, then running the Javascript. Needless to say, this sounds fragile.
I also haven't been able to find anything on capturing the Ajax calls from selenium so I can make them and capture the JSON. When tried copy / paste from the chrome network tab into selenium I got a missing application block message.
Does anyone have any other advice?
Since I can replicate the issue in the chrome debugger, I don't see posting code as useful. It looks like a design decision.
Ralph
Sadly, I wasn't able to do things in a straightforward way. Instead, I used Selenium to do the login and navigate to the page, then use windows API calls to click inside the window send ^a^c to copy the data and an absolute location to click on the button to go to the next page.
The site is set up so that ^a^c copies the raw data for this site. I don't know if that's standard for Angular or not.
Fragile, but it works.
Is there any way to programmatically click on the Yes button in the IE ActiveX Popup window using Watir.
Per the documentation, this is not possible:
Watir will drive web applications that are served up as HTML pages in a web browser. Watir will not work with ActiveX plugin components, Java Applets, Macromedia Flash, or other plugin applications. To determine whether Watir can be used to automate a part of a web application, right click on the object and see if the View Source menu option is available. If you can view the HTML source, that object can be automated using Watir
I'm trying to find some docs to learn how to make phonegap app for windows phone, using native frame transition for HTML pages, but I cannot find such a plugin or code or any helpful doc.
What exactly I want to do is:
when I try to navigate to other page in HTML code using javascript code:
window.location.href = "newpage.html";
I want my app to navigate to different page like native app is doing transition effect, for example when app start we can see this page/frame transition effect.
How to do that transition effect for HTML pages ?
You should look at using jQuery Mobile to build HTML pages for a Phonegap app.
http://jquerymobile.com
It's useful because it has a built-in router, which can detect when you try to change to another HTML page. (either programatically or via a user clicking on links)
It then can hijack that event and make it load the next page asynchronously (which in the case of a Phonegap app, is pretty fast since the pages already exist on the device). It then applies the transitions you speak of when it displays the new page (slide, fade, etc).
It's quite customisable, and most of the behaviour is configured by just creating simple HTML markup and adding data attributes. E.g.
next page
I also like it because if you decide you want to go down the "single page app" route - you can do that too. I personally like the combination of Phonegap + jQuery Mobile + Backbone.js, where Backbone.js is dynamically generating my HTML jQuery Mobile pages, and Phonegap is wrapping them up in an app.
I want to crawl some web pages, like the following
http://www.youtube.com/user/koglin66/feed?filter=2
but there is a 'load more' button, it is related to an ajax request
http://www.youtube.com/channel_ajax?action_load_more_feed_items=1&activity_view=1&paging=1352148528&channel_id=UCCw8aVnsIeu9S6OPQyaQ14g
I want to crawl the whole page.
Manually, I have click on the button repeatedly until there is no more to load,
by automation, how can I crawl the whole page? thanks!
Yes, you can use Selenium IDE, or use other program/library with browser core to do click action. Like webkit, activex of IE.
And you can try FMiner http://www.fminer.com/, it can record and play human actions on browser to scrape data, but it's not free.
I recently faced same problem with other website I wanted to scrap. I use Java and after some research on the web I used Selenium IDE for firefox in which u can write Java Junit test cases which will automatically open the webpage and click buttons, fill up forms, etc.
It also supports C#,Python,Ruby,etc
I used it to click on Load More button and when the page was loaded completely after all clicks I saved it Manually.
You can download Selenium from their website and I found this youtube video useful too http://www.youtube.com/watch?v=twdDfDOrHC4
I want to write a Firefox extension that acts exactly like the built-in RSS feed scanner (as an exercise). It should do the following:
On each new page / tab load, it should scan the content of the page for RSS feeds
If there are RSS feeds in the page, it should put a button in the location bar that the user can click
On clicking the button, a speech bubble should appear under the button (the way a speech bubble appears under the bookmarks star when you click on it), with information on the feeds and buttons to subscribe to them
So my main questions are:
What is the process to run specific content scripts for specific pages?
What is the process to use the results of those scripts to update the speech bubble for each location bar button for each tab?
Basically, I'm trying to figure out how to do in Firefox what Page Actions are in Google Chrome.
To clarify, I want to replicate this functionality in Firefox: http://code.google.com/chrome/extensions/pageAction.html
Please help! :)
This question is similar to this question:
how to have tab-specific xul control with firefox
to have tab specific control. Usually (or maybe I am wrong),the newly added control is the same one across all the different tabs. Change from any tab will change its appearance in all tabs.
still looking for solutions or ideas.