Skip to content
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

[🐛 Hata]:Selenium Bug #15155

Closed
Feyzaaaa opened this issue Jan 25, 2025 · 2 comments
Closed

[🐛 Hata]:Selenium Bug #15155

Feyzaaaa opened this issue Jan 25, 2025 · 2 comments
Labels
I-question Applied to questions. Issues should be closed and send the user to community resources.

Comments

@Feyzaaaa
Copy link

What happened?

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

ChromeDriver'ın yolunu belirtin

chrome_driver_path = "/Users/feyzaerdogan/PycharmProjects/Pythonsel/chrome/chromedriver"

Chrome seçeneklerini yapılandırın

chrome_options = Options()
chrome_options.add_argument("--start-maximized") # Tarayıcı tam ekran açılsın

ChromeDriver hizmetini başlat

service = Service(chrome_driver_path)

WebDriver'i başlat

driver = webdriver.Chrome(service=service, options=chrome_options)

try:
# OrangeHRM giriş sayfasını aç
driver.get("https://opensource-demo.orangehrmlive.com/")

print("Sayfa açıldı: https://opensource-demo.orangehrmlive.com/")

# Sayfanın tamamen yüklendiğini kontrol edin
WebDriverWait(driver, 20).until(
    EC.presence_of_element_located((By.TAG_NAME, "body"))
)

# Kullanıcı adı alanını doldurun
username_field = WebDriverWait(driver, 20).until(
    EC.presence_of_element_located((By.ID, "txtUsername"))  # Eğer ID değişikse XPath kullanabilirsiniz
)
username_field.send_keys("Admin")  # Varsayılan kullanıcı adı

# Şifre alanını doldurun
password_field = WebDriverWait(driver, 20).until(
    EC.presence_of_element_located((By.ID, "txtPassword"))
)
password_field.send_keys("admin123")  # Varsayılan şifre

# Giriş düğmesini bekleyin ve tıklayın
login_button = WebDriverWait(driver, 20).until(
    EC.element_to_be_clickable((By.ID, "btnLogin"))
)
login_button.click()
print("Giriş başarılı! Dashboard sayfasına yönlendirildiniz...")

except Exception as e:
# Eğer bir hata oluşursa terminale yazdır
print(f"Hata oluştu: {e}")

finally:
# Tarayıcı kapanmadan önce kullanıcı müdahalesini bekleyin
print("Tarayıcı açık kalmaya devam ediyor. Kapatmak için Enter tuşuna basın.")
input("Devam etmek için Enter tuşuna basın...") # Manuel kapatma için kullanıcı beklenir
driver.quit() # Tarayıcıyı kapat

How can we reproduce the issue?

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

# ChromeDriver'ın yolunu belirtin
chrome_driver_path = "/Users/feyzaerdogan/PycharmProjects/Pythonsel/chrome/chromedriver"

# Chrome seçeneklerini yapılandırın
chrome_options = Options()
chrome_options.add_argument("--start-maximized")  # Tarayıcı tam ekran açılsın

# ChromeDriver hizmetini başlat
service = Service(chrome_driver_path)

# WebDriver'i başlat
driver = webdriver.Chrome(service=service, options=chrome_options)

try:
    # OrangeHRM giriş sayfasını aç
    driver.get("https://opensource-demo.orangehrmlive.com/")

    print("Sayfa açıldı: https://opensource-demo.orangehrmlive.com/")

    # Sayfanın tamamen yüklendiğini kontrol edin
    WebDriverWait(driver, 20).until(
        EC.presence_of_element_located((By.TAG_NAME, "body"))
    )

    # Kullanıcı adı alanını doldurun
    username_field = WebDriverWait(driver, 20).until(
        EC.presence_of_element_located((By.ID, "txtUsername"))  # Eğer ID değişikse XPath kullanabilirsiniz
    )
    username_field.send_keys("Admin")  # Varsayılan kullanıcı adı

    # Şifre alanını doldurun
    password_field = WebDriverWait(driver, 20).until(
        EC.presence_of_element_located((By.ID, "txtPassword"))
    )
    password_field.send_keys("admin123")  # Varsayılan şifre

    # Giriş düğmesini bekleyin ve tıklayın
    login_button = WebDriverWait(driver, 20).until(
        EC.element_to_be_clickable((By.ID, "btnLogin"))
    )
    login_button.click()
    print("Giriş başarılı! Dashboard sayfasına yönlendirildiniz...")

except Exception as e:
    # Eğer bir hata oluşursa terminale yazdır
    print(f"Hata oluştu: {e}")

finally:
    # Tarayıcı kapanmadan önce kullanıcı müdahalesini bekleyin
    print("Tarayıcı açık kalmaya devam ediyor. Kapatmak için Enter tuşuna basın.")
    input("Devam etmek için Enter tuşuna basın...")  # Manuel kapatma için kullanıcı beklenir
    driver.quit()  # Tarayıcıyı kapat

Relevant log output

/Users/feyzaerdogan/PycharmProjects/Pythonsel/.venv/bin/python /Users/feyzaerdogan/PycharmProjects/Pythonsel/GİRİS.py 
Sayfa açıldı: https://opensource-demo.orangehrmlive.com/
Hata oluştu: Message: 
Stacktrace:
0   chromedriver                        0x00000001026dbe82 chromedriver + 6696578
1   chromedriver                        0x00000001026d3c9a chromedriver + 6663322
2   chromedriver                        0x00000001020dbe3e chromedriver + 405054
3   chromedriver                        0x000000010212c815 chromedriver + 735253
4   chromedriver                        0x000000010212cd11 chromedriver + 736529
5   chromedriver                        0x0000000102177314 chromedriver + 1041172
6   chromedriver                        0x000000010215189d chromedriver + 886941
7   chromedriver                        0x00000001021743f4 chromedriver + 1029108
8   chromedriver                        0x0000000102151613 chromedriver + 886291
9   chromedriver                        0x000000010211e950 chromedriver + 678224
10  chromedriver                        0x000000010211f34e chromedriver + 680782
11  chromedriver                        0x00000001026a9770 chromedriver + 6489968
12  chromedriver                        0x00000001026ac219 chromedriver + 6500889
13  chromedriver                        0x00000001026abd3b chromedriver + 6499643
14  chromedriver                        0x00000001026ac6a5 chromedriver + 6502053
15  chromedriver                        0x0000000102694524 chromedriver + 6403364
16  chromedriver                        0x00000001026ac98f chromedriver + 6502799
17  chromedriver                        0x0000000102685954 chromedriver + 6342996
18  chromedriver                        0x00000001026c4378 chromedriver + 6599544
19  chromedriver                        0x00000001026c4535 chromedriver + 6599989
20  chromedriver                        0x00000001026d3868 chromedriver + 6662248
21  libsystem_pthread.dylib             0x00007ff804098253 _pthread_start + 99
22  libsystem_pthread.dylib             0x00007ff804093bef thread_start + 15

Operating System

macOS

Selenium version

sele

What are the browser(s) and version(s) where you see this issue?

Chrome

What are the browser driver(s) and version(s) where you see this issue?

CHROME 132.0.6834.111 (Resmi Derleme) (x86_64 çevrilmiş) Sürümü

Are you using Selenium Grid?

No response

Copy link

@Feyzaaaa, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@diemol diemol added I-question Applied to questions. Issues should be closed and send the user to community resources. and removed I-defect needs-triaging labels Jan 25, 2025
Copy link

💬 Please ask questions at:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-question Applied to questions. Issues should be closed and send the user to community resources.
Projects
None yet
Development

No branches or pull requests

2 participants