Closed cryzed closed 7 years ago
inox should provide a chromedriver, although its called /usr/bin/inoxdriver
.
I don't think this issue is caused by a patch, but rather from packaging.
Could you try the example below with setting a custom WebDriver:
import time
from selenium import webdriver
driver = webdriver.Chrome('/usr/bin/inoxdriver')
driver.get('http://www.google.com/xhtml');
time.sleep(5)
search_box = driver.find_element_by_name('q')
search_box.send_keys('ChromeDriver')
search_box.submit()
time.sleep(5)
driver.quit()
inox shouldn't ignore the --port
argument.
This nearly worked perfectly, however I got the following error:
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
I fixed this by running: # ln -s /usr/bin/inox /usr/bin/chrome
. It seems like the name of the binary inoxdriver is looking for hasn't been patched to be "inox" -- maybe something to look into. Thank you so much for your help, this is exactly what I was hoping for.
PS: As mentioned in other issues, do you have any plans on possibly updating inox soon to the latest Chromium codebase? Besides using it with Selenium (Chrome really works the most reliable here), I might actually consider switching to it as my everday browser. Thanks for all your work :)!
Glad you got it running. Thanks, this looks definitely something to look into. Yes I will update it as soon as possible, but I'm quite busy right now so it will probably take another few days or a week.
Thanks again and much success! Should I close this then, or wait until you looked into patching the inoxdriver sources accordingly?
Please keep it open, I will track the inoxdriver issue here.
--- a/chrome/test/chromedriver/chrome/chrome_finder.cc
+++ b/chrome/test/chromedriver/chrome/chrome_finder.cc
@@ -91,15 +91,12 @@ void GetApplicationDirs(std::vector<base::FilePath>* locations);
bool FindChrome(base::FilePath* browser_exe) {
base::FilePath browser_exes_array[] = {
#if defined(OS_WIN)
- base::FilePath(L"chrome.exe")
+ base::FilePath(L"inox.exe")
#elif defined(OS_MACOSX)
- base::FilePath("Google Chrome.app/Contents/MacOS/Google Chrome"),
- base::FilePath("Chromium.app/Contents/MacOS/Chromium")
+ base::FilePath("Google Chrome.app/Contents/MacOS/Inox"),
+ base::FilePath("Inox.app/Contents/MacOS/Inox")
#elif defined(OS_LINUX)
- base::FilePath("google-chrome"),
- base::FilePath("chrome"),
- base::FilePath("chromium"),
- base::FilePath("chromium-browser")
+ base::FilePath("inox"),
#else
// it will compile but won't work on other OSes
base::FilePath()
This patch should fix this issue. it will be included in the next release.
@Eloston Ping. Maybe you also want to patch chromedriver to invoke the correct binary
@gcarq I don't touch the branding of Chromium or the output binary file names. I leave it exactly the way the build does it or the packaging scripts (for some distribution) want it (e.g. Debian renames chrome
to chromium
, but that still works according to the code)
@Eloston oh ok, good to know. I've added this diff to branding.patch
so it shouldn't break anything on your side.
@gcarq Alright. Thanks for letting me know.
I'm trying to use inox with Selenium, by adjusting the executable path and options accordingly when starting the webdriver. When using Selenium with Chromium the browser starts, an extension called "Chrome Automation Extension" automatically appears in the list and the instance is automatable with Selenium, however when done so with inox the browser starts and the extension appears, however a timeout error in Selenium occurs while waiting for the service to respond. (Manually installing chromedriver is required for inox, since it doesn't ship with it as it does with Chromium).
I checked the various patches, but couldn't find anything obvious in them that might explain the timeout, i.e. you specifically disabling the features that would allow browser automation (not even in the "disable-default-extensions.patch"). What I'm basically asking: can you possibly point me to which patches I should disable to get Selenium to work with inox?
It seems to possible be inox ignoring the "--port" CLI argument passed to it? Any info on that?