-
-
Notifications
You must be signed in to change notification settings - Fork 603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
selenium selectors not working in 7.0 preScript #2060
Comments
Hi @mscrivo for Firefox and Chrome or one of them? One change is that we have changed Selenium pageLoadStrategy to none, meaning the driver get hold of the page direct after the navigation instead of waiting for page load, I've missed that in the login script. Either in your script you can add a wait/test for an element on the page (that should have been there from the beginning) so that you know the page is loaded (I'll update the example in a couple of days) or you can run with the old page load strategy. Best |
Thank you @soulgalore that worked! I'm running into another issue now ffmpeg, will open a new issue for that one. |
I had this issue, and as of today it's working again with the latest docker image. 👍 |
Hi @soulgalore I am using sitespeed.io 7.0 and executing prescripts, but I am getting NoSuchElementError: ERROR: NoSuchElementError: no such element: Unable to locate element: {"method":"xpath","selector":"//div[@id='product-row-0']/div/div[1]/div/div/div/div/div[2]/div[7]/button[2]"} |
Can you please suggest me to resolve the issue. |
Hi @sureshkrishnaselvam do you run latest 7? looks like your Selenium code isn't working, like the button you try to find isn't there.
Can you verify that the Selenium xpath code works outside of sitespeed.io? You can make sure your code catch these errors when you test and then you can also use the log to get some more info from your runs, like fetching different dom objects in Seleneium and verify that you catch those that you want. Best |
Hi @soulgalore thanks for you comments, I tried in both 7.1.3 and 7.0.0 versions using docker. used different dom objects changed id, name, used xpath in different ways. Its works in selenium scripts but when we run through sitespeed.io its getting error. Here is the script,
} docker run --shm-size=1g --rm -v /Users/sureshkrishna_s/Sitespeed_Volume:/sitespeed.io sitespeedio/sitespeed.io:7.1.13 --preScript /sitespeed.io/login.js https://www.XXXXXXX.com/store/checkout/cart.jsp Error Log: ERROR: WebDriverError: unknown error: Element Continue is not clickable at point (682, 290). Other element would receive the click: (Session info: chrome=67.0.3396.99) (Driver info: chromedriver=2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7),platform=Linux 4.9.87-linuxkit-aufs x86_64) (Session info: chrome=67.0.3396.99) (Driver info: chromedriver=2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7),platform=Linux 4.9.87-linuxkit-aufs x86_64) at Object.checkLegacyResponse (/usr/src/app/node_modules/selenium-webdriver/lib/error.js:546:15) at parseHttpResponse (/usr/src/app/node_modules/selenium-webdriver/lib/http.js:509:13) at doSend.then.response (/usr/src/app/node_modules/selenium-webdriver/lib/http.js:441:30) at at process.tickCallback (internal/process/next_tick.js:188:7) From: Task: WebElement.click() at Driver.schedule (/usr/src/app/node_modules/selenium-webdriver/lib/webdriver.js:807:17) at WebElementPromise.schedule (/usr/src/app/node_modules/selenium-webdriver/lib/webdriver.js:2010:25) at WebElementPromise.click (/usr/src/app/node_modules/selenium-webdriver/lib/webdriver.js:2092:17) at driver.get.then (/sitespeed.io/login.js:30:26) at ManagedPromise.invokeCallback_ (/usr/src/app/node_modules/selenium-webdriver/lib/promise.js:1376:14) at TaskQueue.execute_ (/usr/src/app/node_modules/selenium-webdriver/lib/promise.js:3084:14) at TaskQueue.executeNext_ (/usr/src/app/node_modules/selenium-webdriver/lib/promise.js:3067:27) at asyncRun (/usr/src/app/node_modules/selenium-webdriver/lib/promise.js:2927:27) at /usr/src/app/node_modules/selenium-webdriver/lib/promise.js:668:7 at at process._tickCallback (internal/process/next_tick.js:188:7) |
You can add In your script: Best |
SeleniumHQ/selenium#2969 (comment) |
Just upgraded to 7.0 (using the docker image) and discovered our pre scripts stopped working. It seems that the selenium selectors are not working any more. I am using using essentially an exact copy of https://www.sitespeed.io/documentation/sitespeed.io/prepostscript/ and it's throwing errors like this:
[2018-05-28 20:55:15] ERROR: NoSuchElementError: no such element: Unable to locate element: {"method":"css selector","selector":"*[id="loginPageEmail"]"}
Dropping back down to 6.5.4 and it works perfectly fine.
The text was updated successfully, but these errors were encountered: