I'm trying to test my company's Electron built browser https://github.com/maidsafe/safe_browser but am meeting a few challenges which I am looking for support / guidance with.
After a fair amount of research, it seems I essentially have two options - using Spectron as the test framework or Selenium with Chromedriver. I found a means to use a custom binary with Selenium by using Chrome Options and supplying the path to the browser executable and thought I was on to a winner with that but I hit a major issue - I could launch the browser but any interaction I tried (using the "typical" test automation approach I previously learn with Selenium Java) failed:
Eg WebElement secret = driver.findElement(By.cssSelector("#acc-secret"));
would not work - I got
org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"#acc-secret"}
I also tried to interact with the element by Id and by xpath - none of which worked. I tried the different findElement
methods with different on screen elements and could not get anything to work.
So, I gave up on that approach for the time being - if this had worked it would have been ideal as my automation experience lies with Selenium Java. It's OK though, I'm happy to learn new stuff, so I looked into Spectron.
However, I have found the documentation / blog posts around Spectron difficult to digest - I am a tester rather than a dev and, while I am technically competent, I found the level of assumed knowledge here higher than I currently possess. Plus, it all seems to be Javascript which I have little knowledge of. (This was why I was hoping to go be able to go the Selenium route which I am familiar with.)
What I want to do is to create a suite of tests independent of the browser's codebase where we (QA team) can build eg Page Object Models and associated test cases.
Any ideas / suggestions / guidance would be most gratefully received as I feel that I am not really getting far at the moment!