fabifont / abb-bot

aliexpress bonus buddies bot
MIT License
19 stars 9 forks source link

org.openqa.selenium.NoSuchElementException: no such element #12

Open ardayksl opened 3 years ago

ardayksl commented 3 years ago

Hi i am having a problem with bot. It starts and opens 2 windows. one with temp mail and one with the twitter. Then it closes both. Waits a bit and starts again. Could it be because of twitter page starts in turkish ? I had tried ways to change the language but failed.

[INFO]: Logging su file abilitato: C:\Users\Arda\aliexpress\logfile.txt
[INFO]: Caricamento della configurazione in corso...
[INFO]: Configurazione caricata correttamente
[INFO]: Chiudo le istanze di Chrome e ChromeDriver
[INFO]: TenMinuteMailNet ha ratio 1,000000
[INFO]: Provider scelto => TenMinuteMailNet
[INFO]: Letta email temporanea!
[ERROR]: Eccezione non gestita!
[TRACE]: org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//input[@name="Data di nascita"]"}
  (Session info: chrome=88.0.4324.104)
For documentation on this error, please visit: https://selenium.dev/exceptions/#no_such_element
Build info: version: '4.0.0-alpha-7', revision: 'de8579b6d5'
System info: host: 'DESKTOP-LKBRLTI', ip: '192.168.42.134', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '15.0.2'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 88.0.4324.104, chrome: {chromedriverVersion: 88.0.4324.96 (68dba2d8a0b14..., userDataDir: C:\Users\Arda\aliexpress\ch...}, goog:chromeOptions: {debuggerAddress: localhost:52986}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
Session ID: 4fcd4dfc2775b2dce6a103262ecf3d62
*** Element info: {Using=xpath, value=//input[@name="Data di nascita"]}
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
    at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:196)
    at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:129)
    at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:53)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:167)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:123)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:501)
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:332)
    at org.openqa.selenium.By$ByXPath.findElement(By.java:379)
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:312)
    at com.fabifont.aliexpress.account.Account.createLinkedTwitterAccount(Account.java:110)
    at com.fabifont.aliexpress.account.AccountWorker.call(AccountWorker.java:56)
    at com.fabifont.aliexpress.account.AccountWorker.call(AccountWorker.java:17)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
    at java.base/java.lang.Thread.run(Thread.java:832)
ardayksl commented 3 years ago

Found a way to force italiano. Now it fills the blanks on twitter but still stops there. Waits a bit and then kills both windows and after a little time starts again.

Adding this line to accountworker made the new chrome windows and pages italiano. chromeOptions.addArguments("--lang=it");

Eccezione non gestita!
[TRACE]: org.openqa.selenium.TimeoutException: Expected condition failed: waiting for com.fabifont.aliexpress.account.Account$$Lambda$411/0x0000000800d8b088@30034dc5 (tried for 5 second(s) with 500 milliseconds interval)
    at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:211)
    at com.fabifont.aliexpress.account.Account.waitForNext(Account.java:240)
    at com.fabifont.aliexpress.account.Account.createLinkedTwitterAccount(Account.java:115)
    at com.fabifont.aliexpress.account.AccountWorker.call(AccountWorker.java:56)
    at com.fabifont.aliexpress.account.AccountWorker.call(AccountWorker.java:17)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
    at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[@class="css-18t94o4 css-1dbjc4n r-urgr8i r-42olwf r-sdzlij r-1phboty r-rs99b7 r-1w2pmg r-174vidy r-ydfevp r-1ny4l3l r-1fneopy r-o7ynqc r-6416eg r-lrvibr"]
eguuuu commented 3 years ago

Hi i am having a problem with bot. It starts and opens 2 windows. one with temp mail and one with the twitter. Then it closes both. Waits a bit and starts again. Could it be because of twitter page starts in turkish ? I had tried ways to change the language but failed.

[INFO]: Logging su file abilitato: C:\Users\Arda\aliexpress\logfile.txt
[INFO]: Caricamento della configurazione in corso...
[INFO]: Configurazione caricata correttamente
[INFO]: Chiudo le istanze di Chrome e ChromeDriver
[INFO]: TenMinuteMailNet ha ratio 1,000000
[INFO]: Provider scelto => TenMinuteMailNet
[INFO]: Letta email temporanea!
[ERROR]: Eccezione non gestita!
[TRACE]: org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//input[@name="Data di nascita"]"}
  (Session info: chrome=88.0.4324.104)
For documentation on this error, please visit: https://selenium.dev/exceptions/#no_such_element
Build info: version: '4.0.0-alpha-7', revision: 'de8579b6d5'
System info: host: 'DESKTOP-LKBRLTI', ip: '192.168.42.134', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '15.0.2'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 88.0.4324.104, chrome: {chromedriverVersion: 88.0.4324.96 (68dba2d8a0b14..., userDataDir: C:\Users\Arda\aliexpress\ch...}, goog:chromeOptions: {debuggerAddress: localhost:52986}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
Session ID: 4fcd4dfc2775b2dce6a103262ecf3d62
*** Element info: {Using=xpath, value=//input[@name="Data di nascita"]}
  at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
  at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
  at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
  at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:196)
  at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:129)
  at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:53)
  at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:167)
  at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:123)
  at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:501)
  at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:332)
  at org.openqa.selenium.By$ByXPath.findElement(By.java:379)
  at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:312)
  at com.fabifont.aliexpress.account.Account.createLinkedTwitterAccount(Account.java:110)
  at com.fabifont.aliexpress.account.AccountWorker.call(AccountWorker.java:56)
  at com.fabifont.aliexpress.account.AccountWorker.call(AccountWorker.java:17)
  at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
  at java.base/java.lang.Thread.run(Thread.java:832

Hi i am having a problem with bot. It starts and opens 2 windows. one with temp mail and one with the twitter. Then it closes both. Waits a bit and starts again. Could it be because of twitter page starts in turkish ? I had tried ways to change the language but failed.

[INFO]: Logging su file abilitato: C:\Users\Arda\aliexpress\logfile.txt [INFO]: Caricamento della configurazione in corso... [INFO]: Configurazione caricata correttamente [INFO]: Chiudo le istanze di Chrome e ChromeDriver [INFO]: TenMinuteMailNet ha ratio 1,000000 [INFO]: Provider scelto => TenMinuteMailNet [INFO]: Letta email temporanea! [ERROR]: Eccezione non gestita! [TRACE]: org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//input[@name="Data di nascita"]"} (Session info: chrome=88.0.4324.104) For documentation on this error, please visit: https://selenium.dev/exceptions/#no_such_element Build info: version: '4.0.0-alpha-7', revision: 'de8579b6d5' System info: host: 'DESKTOP-LKBRLTI', ip: '192.168.42.134', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '15.0.2' Driver info: org.openqa.selenium.chrome.ChromeDriver Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 88.0.4324.104, chrome: {chromedriverVersion: 88.0.4324.96 (68dba2d8a0b14..., userDataDir: C:\Users\Arda\aliexpress\ch...}, goog:chromeOptions: {debuggerAddress: localhost:52986}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true} Session ID: 4fcd4dfc2775b2dce6a103262ecf3d62 *** Element info: {Using=xpath, value=//input[@name="Data di nascita"]} at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481) at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:196) at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:129) at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:53) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:167) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:123) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:501) at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:332) at org.openqa.selenium.By$ByXPath.findElement(By.java:379) at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:312) at com.fabifont.aliexpress.account.Account.createLinkedTwitterAccount(Account.java:110) at com.fabifont.aliexpress.account.AccountWorker.call(AccountWorker.java:56) at com.fabifont.aliexpress.account.AccountWorker.call(AccountWorker.java:17) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) at java.base/java.lang.Thread.run(Thread.java:832)

Can you run this project perfectly