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

[🚀 Feature]: SELENİUM BUG #15156

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

[🚀 Feature]: SELENİUM BUG #15156

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

Feature and motivation

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

Usage example

HELLO ALTHOUGH THE PROJECT BUT I GOT AN ERROR.HOW CAN I FİND SOLUTİON?CAN YOU HELP ME?

Image
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-enhancement 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