selenium-webdriver

How to remove the message Browser is under remote control from Firefox using Selenium

[亡魂溺海] 提交于 2021-02-05 08:53:19
问题 I want to remove this machine icon while running firefox using selenium using python3 Here is my code :- from selenium import webdriver from webdriver_manager.firefox import GeckoDriverManager from selenium.webdriver.firefox.firefox_binary import FirefoxBinary profile = webdriver.FirefoxProfile('C:\\Users\\you\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\64nrwj2y.default-release') PROXY_HOST = "87.255.27.163" PROXY_PORT = "3128" user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3)

How to remove the message Browser is under remote control from Firefox using Selenium

痴心易碎 提交于 2021-02-05 08:53:05
问题 I want to remove this machine icon while running firefox using selenium using python3 Here is my code :- from selenium import webdriver from webdriver_manager.firefox import GeckoDriverManager from selenium.webdriver.firefox.firefox_binary import FirefoxBinary profile = webdriver.FirefoxProfile('C:\\Users\\you\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\64nrwj2y.default-release') PROXY_HOST = "87.255.27.163" PROXY_PORT = "3128" user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3)

How to locate the last web element using classname attribute through Selenium and Python

若如初见. 提交于 2021-02-05 08:47:05
问题 getphone = driver.find_element_by_class_name('_3ko75')[-1] phone = getphone.get_attribute("title") Not working I need to get the title on string format. Exception has occurred: TypeError 'WebElement' object is not subscriptable File "C:\Users\vmaiha\Documents\Python Projects\Project 01\WP_Answer.py", line 43, in check getphone = driver.find_element_by_class_name('_3ko75')[-1] 回答1: Based on your code trials, to get the title of the last WebElement based on the value of the classname attribute

SessionNotCreatedException: Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary'

感情迁移 提交于 2021-02-05 08:41:29
问题 When I try to create a Firefox instance in Selenium, I get the following error: Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line I'm running on Ubuntu 20.04 Any suggestions would be appreciated . browser = webdriver.Firefox() Traceback (most recent call last): File "key.py", line 10, in <module> browser = webdriver.Firefox() File "/usr/local/lib/python3.8

java.lang.UnsupportedClassVersionError: org/openqa/selenium/WebDriver : Unsupported major.minor version 52.0 error with Selenium through Java 7

China☆狼群 提交于 2021-02-05 08:28:06
问题 This is the code of selenium code to open the chrome browser and closing it. import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.By; public class TC001_Login_Logout { public static void main(String args[]) throws Exception { System.setProperty("webdriver.chrome.driver", "C:\\Eclipse\\Selenium\\chrome"); WebDriver driver = new ChromeDriver(); driver.get("http://127.0.0.1/orangehrm-2.6/login.php"); System.out.println("Application

Java selenium how to open a link from google search results?

坚强是说给别人听的谎言 提交于 2021-02-05 08:25:08
问题 I am new to automation testing in Selenium and i am doing some basic automation testing such as searching for something in Google and then clicking on a link which is required from the search results. The code below, which i have produced works up until i get to the testing method. I am unable to select a link from the Google search page but i am not being shown any errors on my console. So i setup a thread on this particular line and it mentioned it could find the link name however the link

How to upload a file by transfering the file from the local machine to the remote web server using Selenium Grid

时光毁灭记忆、已成空白 提交于 2021-02-05 08:16:08
问题 File Upload with a Selenium Grid: Code import java.net.MalformedURLException; import java.net.URL; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.LocalFileDetector; import org.openqa.selenium.remote.RemoteWebDriver; public class Main { public static void main(String[] args) throws MalformedURLException { DesiredCapabilities capabilities =

Getting error exception in thread “main” java.lang.NullPointerException

回眸只為那壹抹淺笑 提交于 2021-02-05 08:15:48
问题 When i run the following class files in selenium, the browser is launched and URL is opened but error after that: exception in thread "main" java.lang.NullPointerException at guru99project.guru99project.printtitlepage(guru99project.java:25) at guru99project.Main_method.main(Main_method.java:10) Code trials: package guru99project; import org.openqa.selenium.By; import org.openqa.selenium.Dimension; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa

Getting error exception in thread “main” java.lang.NullPointerException

偶尔善良 提交于 2021-02-05 08:15:46
问题 When i run the following class files in selenium, the browser is launched and URL is opened but error after that: exception in thread "main" java.lang.NullPointerException at guru99project.guru99project.printtitlepage(guru99project.java:25) at guru99project.Main_method.main(Main_method.java:10) Code trials: package guru99project; import org.openqa.selenium.By; import org.openqa.selenium.Dimension; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa

Selenium (Python) >> selenium.common.exceptions.NoSuchFrameException:

北城余情 提交于 2021-02-05 08:12:05
问题 I've been trying to enter to an iframe and write text in a search bar ( tag) in Safari: I can't post the html because it's huge and it isn't mine but this is the iframe code: <iframe frameborder="0" id="contentIFrame0" name="contentIFrame0" title="Área de contenido" style="border: 0px none; overflow: hidden; position: absolute; left: 0px; right: 0px; height: 100%; width: 100%; visibility: visible; display: block;"> (...Content of the iframe...) </iframe> Here is python code: wait.until(ec