selenium-webdriver

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

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

你说的曾经没有我的故事 提交于 2021-02-07 03:01:22
问题 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

Selenium/Python - hover and click on element

ぃ、小莉子 提交于 2021-02-07 02:48:29
问题 I'm running into an issue with my Selenium script on Python. In the javascript web application that I'm interacting with, an element I need to click doesn't exist until I hover over it. I've looked and found various answers on how to hover, but the sequence needs to include the clicking of a new element during the hover event. Here is the code I am currently working with. The element is renamed from add to add1 when a hover occurs, once add1 exists; I should be able to click/send.keys to

How do I send a DELETE keystroke to a text field using Selenium with Python?

倾然丶 夕夏残阳落幕 提交于 2021-02-06 15:19:15
问题 How do I send a Keys.DELETE keystroke to a text field with the Selenium web tester? I'm trying to simulate the user typing in a field and then deleting what they typed to test the interactive autosuggestion feature. It should filter the list to items beginning with their query, then show all the possible suggestions again when they delete their query. Unfortunatley sending a .clear() doesn't work to un-filter the list again. Neither does send_keys('\127'). def get_suggestions(): driver.get(

Get all Elements in a Form

为君一笑 提交于 2021-02-05 20:25:50
问题 I would like to use Selenium to submit a form which contains several elements. For example: <form name="something"> <input type="text" name="a">Username</input> <input type="password" name="b">password</input> <select name="c" id="c"> <option value="1">1</option> <option value="2">2</option> </select> <input type="submit" name="submit">submit</input> </form> If I use find.Element(By.name) to find out the form element, how can I get its children elements a, b, and c? And input the values into

Get all Elements in a Form

混江龙づ霸主 提交于 2021-02-05 20:24:38
问题 I would like to use Selenium to submit a form which contains several elements. For example: <form name="something"> <input type="text" name="a">Username</input> <input type="password" name="b">password</input> <select name="c" id="c"> <option value="1">1</option> <option value="2">2</option> </select> <input type="submit" name="submit">submit</input> </form> If I use find.Element(By.name) to find out the form element, how can I get its children elements a, b, and c? And input the values into