approach for multilingual testing using selenium webdriver - selenium-webdriver

I am new to automation.My project is a multilingual website.Wanted to know how best can I automate it using selenium webdriver & Testng.

You can automate a multilingual website using Selenium Webdriver, there are few basic things you need to keep in mind:
If you are using locators which is using any textual content like
text(), starts-with() e.t.c - You need to handle them separately
for each language.
If you are using any text based validations, you need to take care of them as well.
I would suggest you to create a localization file for each language and load them according to the language you are using. In that localization file you can handle things like locators and assertions which uses text()

Related

Angularjs mutlilingual support using protractor

I have been working in Angularjs application and we have already written protractor framework to test. Application need multi language support now, whereas our testscripts are in English. Can anyone suggest me how to add multilingual support for other language in existing framework
Note: we will need the English testscripts for english locale anyways.

How can I migrate the existing MVC+AngularJS application to Mvc+Angular4 application

I have an existing application written in mvc5 and Angular1.I want to convert all Angular1 code to Angular4 code. Is there any tool available for migration/I have to do manually.
No, There is no such tool available yet.
You have to create it manually. You need to convert all your pages in components as per documentation
These are few document links you can follow though.
https://www.joshmorony.com/how-to-convert-an-ionic-1-application-to-ionic-2/
https://angular.io/docs/ts/latest/guide/upgrade.html
https://www.codementor.io/angularjs/tutorial/migrating-from-angular-1-to-angular-2
https://vsavkin.com/migrating-angular-1-applications-to-angular-2-in-5-simple-steps-40621800a25b

Can we Test a Vaadin application with Selenium and cucumber?

i have to Test a Vaadin application with cucumber and Selenium web driver(using Java script Executor).is it a good approach for vaadin application Testing?
Yes, You can use Selenium and cucumber but you need to manage your framework to handle multiple windows and using Event firing and event listener classes.
My understanding of Vaadin application in which a UI is a viewport running in a web page. A web page can actually have multiple such UIs within it. Such situation is typical especially with portlets in a portal
--So your framework or test should handle multiple windows.
-- Need to handle Vaadin Sessions.
Vaadin follows an event-driven programming paradigm, in which events, and listeners that handle the events, are the basis of handling user interaction in an application
You need to have good knowledge of Selenium to automate Vaadin
It is possible to test a Vaadin application using only Selenium. However, it might be better to use Vaadin TestbenchVaadin. Testbench is based on Selenium, but provides better integration with Vaadin. The main advantages are:
1. There is no need to provide manual delays between actions, because it waits for UI Components to load.
2. It provides additional selectors to select Vaadin components.
3. It can provide screenshots of failed tests.
The only downside is that Testbench is a commercial feature that requires you to pay money.
For a more detailed analysis of pros/cons is see: Official Blog Entry
There is a Github repository that shows a basic setup of testbench as well as plain Selenium.
I used to have same problem, and I used the Selenium IDE for identifying the XPATH for each element in vaadin, then use it like this:
driver.findElement(By.xpath("//div[#id='thalamusboapp-218829419']/div/div[2]/div[3]/div/div/div[2]/div/span/span") );

Squish for testing GUI developed using ExtJS

I am looking for automated testing tools to test a webpage heavily written using ExtJS. Initially I was using casperJS/phantomJS. Since, those tests work best in a CI environment and are super-light and easy to code. But I found a limitation that casperJs does not support TrifleJS for IE testing. It only supports phantomJS(chrome and safari) and slimerJS(firefox).
I need to test our web-app on IE9, IE10 and IE11 too. Squish seems to be very flexible and well-developed. I want to know whether it is suitable for testing the ExtJS web-app.
Thanks
According to the matrix at this link Squish does support ExtJS framework. Of course main problem of testing ExtJS apps is that all the element IDs are dynamically generated and one cannot rely on these for UI testing. However Squish provides XPath-based search that can be used instead.
I'm actively evaluating Squish for our ExtJS 4.2.x based web app so in a while if you interested I would be able to provide more insights but it does look very promising especially since you can use Eclipse-based plugin to build your tests visually

Using TCPDF as an engine through CakePDF

I'm using Ceeram's CakePDF plugin on CakePHP 2.2. It makes generating PDFs using Cake's layouts and views very easy and for the most part I have not had any problems with it.
However, I want to be able to access some of the more advanced features of TCPDF, specifically the barcode features.
If I was using TCPDF directly, I could just do $pdf->writeBarcode(); but as I'm using TCPDF as an engine in the CakePDF Plugin, I'm not sure how to go about accessing it, or if it's even possible.
$CakePdf->writeBarcode(); doesn't work, but then I wouldn't really have expected it to. There is nothing in Ceeram's docs that mentions it, though.
It does not support that by default, it just converts your view into a rendered PDF, but it won't let you access the "advanced" functionalities of your PDF Engine. Of course you are always free to extend the plugin to do allow this feature. I reckon you'd have to add it in the Pdf/CakePdf.php class file to get it to work.

Resources