-
Notifications
You must be signed in to change notification settings - Fork 0
Technology research
When we want to do sth with a widget that looks like recorded widget we have a couple of options
- find location of the widget on the current page (having screenshots, on server side)
- use mouse to move to the middle of the widget in question (as for click)
- use mouse click
- find location of the widget on the current page (having screenshots, on server side)
- find identifier of the widget given the location (via e.g. extension in case of Chrome, or better JS snippet execution)
- click it using Webdriver API (see w3 webdriver specification)
w3 webdriver specification mentions element location strategies. People claim that it is possible to add such strategy when starting selenium server. Depending on what information is provided inside such a strategy, it might useful for our purpose.
We might want to have multiple containers with the same or different setup for different users and create or deploy them on demand. Then these commands will be useful:
docker run --name selenium-3 -p :4444 -p :5555 -d jakozaur/docker-selenium:v1.3
docker port selenium-3 4444
docker port selenium-3 5555
In w3 webdriver specification it is proposed that a takeScreenshotElement action is available. It's not exposed neither in nightwish nor in webdriver.io. Under Chrome 45.0.2454.85 (64-bit; MacosX 10.9.5) does not work :/
A workaround is possible with use of ImageMagick&co: http://stackoverflow.com/a/23087000