selenium

Python Selenium Loop Through Links

倖福魔咒の 提交于 2021-02-07 04:13:52
问题 Im new to python, or coding for that matter... This part of the code allows me to find all the elements that I want to click (click on the link open a new tab) from selenium import webdriver import time driver = webdriver.Chrome() driver.get("http://www.rezultati.com/kosarka/filipini/kup/") list_of_links = driver.find_elements_by_css_selector(".cell_ad.time") for link in list_of_links: link.click() Obviously this for loop only opens links.. I'm interested in how to add, somethin like this, to

Execute AutoIt code from Eclipse

ⅰ亾dé卋堺 提交于 2021-02-07 04:10:28
问题 I am doing automation using Selenium WebDriver and want to handle a browser authentication window. I know Selenium does not support this on its own but I am able to using AutoIt. We have to share our code with the client, so can AutoIt code be managed from Eclipse? This is the code: WinWaitActive("Authentication Required", "", "120") If WinExists("Authentication Required") Then Send("username{TAB}") Send("password{Enter}") EndIf Code to run the AutoIt.exe from Eclipse: Runtime.getRuntime()

Execute AutoIt code from Eclipse

泄露秘密 提交于 2021-02-07 04:10:25
问题 I am doing automation using Selenium WebDriver and want to handle a browser authentication window. I know Selenium does not support this on its own but I am able to using AutoIt. We have to share our code with the client, so can AutoIt code be managed from Eclipse? This is the code: WinWaitActive("Authentication Required", "", "120") If WinExists("Authentication Required") Then Send("username{TAB}") Send("password{Enter}") EndIf Code to run the AutoIt.exe from Eclipse: Runtime.getRuntime()

Explicit Wait for findElements in Selenium Webdriver

纵然是瞬间 提交于 2021-02-07 04:07:00
问题 After login, the page is redirecting to one page (I want to wait for page load), where I am finding elements by tagName, By inputArea = By.tagName("input"); List <WebElement> myIput = driver.findElements(inputArea); Here I want to give Explicit Wait for findElements, I want to wait for its all its visibility or presence. There are only two inputs in my web page. If I give Implicit Wait for a long time, the code will work. But it varies. So i decided to give Explicit Wait, How can i give

Execute AutoIt code from Eclipse

有些话、适合烂在心里 提交于 2021-02-07 04:06:37
问题 I am doing automation using Selenium WebDriver and want to handle a browser authentication window. I know Selenium does not support this on its own but I am able to using AutoIt. We have to share our code with the client, so can AutoIt code be managed from Eclipse? This is the code: WinWaitActive("Authentication Required", "", "120") If WinExists("Authentication Required") Then Send("username{TAB}") Send("password{Enter}") EndIf Code to run the AutoIt.exe from Eclipse: Runtime.getRuntime()

Element is not clickable at point (x,y.5) because another element obscures it

匆匆过客 提交于 2021-02-07 03:33:32
问题 I am trying to click on an element but getting the error: Element is not clickable at point (x,y.5) because another element obscures it. I have already tried moving to that element first and then clicking and also changing the co-ordinates by minimizing the window and then clicking, but both methods failed. The possible duplicate question has answers which I have already tried and none of them worked for me. Also, the same code is working on a different PC. How to resolve it? 回答1: There is

Element is not clickable at point (x,y.5) because another element obscures it

点点圈 提交于 2021-02-07 03:25:39
问题 I am trying to click on an element but getting the error: Element is not clickable at point (x,y.5) because another element obscures it. I have already tried moving to that element first and then clicking and also changing the co-ordinates by minimizing the window and then clicking, but both methods failed. The possible duplicate question has answers which I have already tried and none of them worked for me. Also, the same code is working on a different PC. How to resolve it? 回答1: There is

How to Detach Chrome Browser from Chrome Driver (Selenium Web Driver C#)

天大地大妈咪最大 提交于 2021-02-07 03:03:42
问题 I want to use Selenium Web Driver in VS 2010 C# to open a Chrome browser, navigate to some web page and then close the driver but keep the browser open . I realize that I will have to manually close the browser afterwards and I'm okay with that. So far I have: DriverService service = ChromeDriverService.CreateDefaultService(); ChromeOptions options = new ChromeOptions(); options.AddAdditionalCapability("chrome.detach",true); m_driver = new ChromeDriver(service, options, TimeSpan

How to get the value of an element in Python + Selenium?

感情迁移 提交于 2021-02-07 03:01:48
问题 I have got this HTML element in my Python (3.6.3) code (as Selenium webelement of course): <span class="ocenaCzastkowa masterTooltip" style="color:#000000;" alt="Kod: pd1<br/>Opis: praca domowa<br/>Waga: 2,00<br/>Data: 12.09.2017<br/>Nauczyciel: (NAME CENSORED)">5</span> and I want to get the value at the end (which is 5 in this case) and I have got no idea how to get it. obviously I can't use webelement.get_attribute() cause I don't know the name of the attribute. 回答1: Try the following code

How to Detach Chrome Browser from Chrome Driver (Selenium Web Driver C#)

橙三吉。 提交于 2021-02-07 03:01:23
问题 I want to use Selenium Web Driver in VS 2010 C# to open a Chrome browser, navigate to some web page and then close the driver but keep the browser open . I realize that I will have to manually close the browser afterwards and I'm okay with that. So far I have: DriverService service = ChromeDriverService.CreateDefaultService(); ChromeOptions options = new ChromeOptions(); options.AddAdditionalCapability("chrome.detach",true); m_driver = new ChromeDriver(service, options, TimeSpan