Most of my code is similar to the solution code, but I noticed that the solution code tends to search for Element objects matching a class by using the getElementsByClass method, and my code generally uses the select() method (this seems to be more in use currently when searching for how to do this). Also, I tend to select the matching element using first() instead of get(0).
It seems that both of these should be equivalent, but I am wondering if the reason it is not passing validation is due to CG strictly looking for the specific methods, or due to something else wrong in my code.
package com.codegym.task.task28.task2810;
import com.codegym.task.task28.task2810.model.LinkedinStrategy;
import com.codegym.task.task28.task2810.model.Model;
import com.codegym.task.task28.task2810.model.Provider;
import com.codegym.task.task28.task2810.model.Strategy;
import com.codegym.task.task28.task2810.view.HtmlView;
public class Aggregator
{
public static void main(String[] args)
{
HtmlView view = new HtmlView();
Strategy strategy = new LinkedinStrategy();
Provider provider = new Provider(strategy);
Model model = new Model(view, provider);
Controller controller = new Controller(model);
view.setController(controller);
view.emulateCitySelection();
}
}