I am working on writing some automation script and it is project's requirement to work with WebDriverIO( node js and typescript). I am stuck in a situation where I have to get some data from web page and I can't use scroll(project requirement) so I want to zoom out(like ctrl+ -). According to WebDriverIO page https://webdriver.io/docs/api/browser/keys.html I can use there Keys module. But it does not work.
Need some help with it.
For the record I have been using selenium webdriver with c# and there I have done this thing using IJavascriptExecuter. But here I am stuck and couldn't find anything on web related to it.
Thanks in Advance!
Related
Currently I'm working on a tester program for an inhouse project. The logic is written in node, for sending and receiveing data via serialport Im using serialport module and the data I receive is stored in excel with the XLSX populate module. The program works fine, but I want to create a basic UI to show the realtime data on a chart, also some input fields and buttons to control. I tried communicating with a browser, but it seems that browsers do not like commonJs modules. I did some research on the topic, but the answers were not clear.
Is there a way to use commonJs modules in the browser?
If I build a node project, can I connect it to an HTML like an ordinary JS file?
If not, what framework do I need in order to do so?
Sorry if my letter is annoyingly untechnical, Im doing my best:)
has anyone tried using Tabulator in a Polymer 3 project?
Polymer is not supported by Tabulator but maybe someone has tried to integrate it.
Thanks
Tabulator is a vanilla JS library, as such it will work in any JavaScript Frontend Framework without issue.
The supported frameworks list on the website simply demonstrates how to set it up with those frameworks. If you follow the standard Quickstart Guide you should be up and running in no time.
With most frameworks it is simply a matter of passing a reference to the div created by the framework into the first argument of the constructor instead of the CSS selector string.
You would normally need to instantiate Tabulator after the render phase of your particular framework.
If you do get something setup then please submit some simple demo code as an issue on the Tabulator Git Repo and i can add it to the website to help others
The Framework Documentation includes several examples of setting up Tabulator in a frontend framework that should give you some pointers on how to address the issue.
We are looking to replace our Selenium approach to automated web data collection and have been recommended Puppeteer or Chromeless.
One of the things I like is the ability to go headless with chrome running on AWS lambda. That reason was sold as the main reason for going with Chromeless or Puppeteer. However, I see posts online indicating that the same can be done with Selenium. If that is true, what over advantages do Chromeless and Puppeteer offer over Selenium ?
We are going to be using NodeJS
Having used both Selenium and Puppeteer, these would be my observations as to why it's currently being recommended so highly:
Puppeteer is really easy to configure and execute. No setting specific drivers required. Just write your test scripts, point node towards your scripts and watch it go. Everything even runs in parallel!
It's a zero setup framework in that it comes bundled with the version of Chromium which it runs best with.
Another benefit is speed. Puppeteer is really fast since it uses headless Chrome.
It integrates very nicely with other popular test frameworks such as jest and mocha.
Using Puppeteers API is really straightforward. Everything is simple to write, easy to understand and basically allows for simple user interactions to be automated using a single line of code.
It's really easy to debug your automation scripts. Simply set headless to false and turn slowMo up from 0 to, say, 250 and you can easily see what's going on and fix any problems you may have.
It's easy to pick up and use no matter what your previous experience levels: on the team I'm working on, everyone (even those with no real automation test script writing experience) has found working with Puppeteer a really nice and relaxed experience. Everyone is getting the grasp of it within a few minutes of basic research and getting scripts running quickly and with no hassle or stress.
It should be noted that Selenium does do everything that Puppeteer does (and vice versa) but that's not the point of Puppeteer. Puppeteer allows for a team to build a large library of automation scripts very quickly using an easy to use API and get tests running now rather than having to deal with building ultra-robust test frameworks which work cross browser and / or cross device.
If you really must have cross browser testing then Selenium or perhaps InternJS (a personal favourite of mine) are still the choices to make.
Puppeteer only supports executing tests on Chrome but, at the end of the day, it's much better to have a lot of tests running (even if it's just on Chrome) as opposed to having none.
I prefer using NodeJS, to acheive the follow flow,
Navigate to a site, find a form, set values, submit form, get the result of submittion (usually redirect), find hrefs there, and navigate to them.
which package is the best documented and supports those?
Thanks!
PhantomJS and CasperJs are great js tools for web scraping, maybe a little difficult to learn.
SpookyJS allows you to run PhantomJS/CasperJS within Nodejs environnement.
Those packages are well documented.
Recently, i discovered an interessting package named nightmare that is 'a high-level browser automation library'.
Here is a link for nightmare
I am trying to figure out how to open a new window from within my WinJS Universal Windows app.
I've found plenty of examples of how to do this in a XAML Universal App using Windows.ApplicationModel.Core.CoreApplication.CreateNewView, but I can't seem to find a reference to that method within the WinJS or Windows namespaces in my Javascript. According to code-hints when I am writing my Javascript, I am able to see that there is a Windows.ApplicationModel.Core namespace, but the only class that appears in it is AppListEntry. No CoreApplication or any of the other classes that the documentation suggests should be there.
I've been digging around trying to find out if this is possible. I haven't been able to find any resources that specifically say you can't perform this action in a WinJS app, but I haven't found any examples that show how to do this either.
I downloaded the Universal Windows App Samples, and they do have a MultipleViews project there, but it doesn't include a JS build.
Does anyone know if it is possible to open a new window from within a WinJS app?
What happens when you do:
window.open("http://www.w3schools.com");
Or set target as "_blank" as you would do for an HTML window?
Visit W3Schools
There is tool written for the Intel XDK (A Cordova product), which can work around some of the limitations of JS running on Windows. Here is a link: https://github.com/xmnboy/xdk-win8x-compat.js . It may resolve some of these issues.
When I was writing Win8 JS apps, I know that I could wrap a function in:
MSApp.execUnsafeLocalFunction(unsafeFunction);
(documentation), which would allow me to inject JS to the DOM. You may be able to write a function that creates a new window with that.