selenium-webdriver

Can nightwatch.js use usingServer from selenium-webdriver?

帅比萌擦擦* 提交于 2021-01-29 01:49:55
问题 I have a suite of tests using local drivers built with nightwatch. Works well. I am running a basic test using Perfecto Mobile and selenium-webdriver. It works with this example.(https://community.perfectomobile.com/series/20208/posts/1002862) I am trying to connect my suite of nightwatch test to perfecto, but can't start selenium. If this is the url of the selenium server. var url = "https://mobilecloud.perfectomobile.com/nexperience/perfectomobile/wd/hub"; I tried a few ways to set it up

Can nightwatch.js use usingServer from selenium-webdriver?

坚强是说给别人听的谎言 提交于 2021-01-29 01:43:04
问题 I have a suite of tests using local drivers built with nightwatch. Works well. I am running a basic test using Perfecto Mobile and selenium-webdriver. It works with this example.(https://community.perfectomobile.com/series/20208/posts/1002862) I am trying to connect my suite of nightwatch test to perfecto, but can't start selenium. If this is the url of the selenium server. var url = "https://mobilecloud.perfectomobile.com/nexperience/perfectomobile/wd/hub"; I tried a few ways to set it up

Get specific value based on column & row name from dynamic Web table in which columns & rows position also dynamic

萝らか妹 提交于 2021-01-28 20:20:18
问题 I have to print a specific value based on column and row names. Bt the problem is that columns position and rows position changes every time. And table data is dynamic, values are changing continuously. All the values are not constantmy dynamic web table is. and i want specific value of month April in year 2001. 回答1: Here is the sample table based on the attached screenshot. <html> <table id='table1' border=" 1px solid black"> <tr> <th>Month/Year</th> <th>2003</th> <th>2004</th> <th>2001</th>

AttributeError: 'Options' object has no attribute 'binary' error invoking Headless Firefox using GeckoDriver through Selenium

百般思念 提交于 2021-01-28 20:06:08
问题 options = FirefoxOptions() options.add_argument("--headless") driver = webdriver.Firefox(firefox_options=options, executable_path='/Users/toprak/Desktop/geckodriver') driver.get("https://twitter.com/login?lang=en") When I try to run my code, I get this error: Warning (from warnings module): File "/Users/toprak/Desktop/topla.py", line 19 driver = webdriver.Firefox(firefox_options=options, executable_path='/Users/toprak/Desktop/geckodriver') DeprecationWarning: use options instead of firefox

Enter text into the Chrome's address bar via Selenium

情到浓时终转凉″ 提交于 2021-01-28 19:58:45
问题 is it possible to enter a text to the address bar in Chrome with Selenium? I would like to resolve domains and get the final URL. E.g. enter freshfruits.com resolves https://www.freshfruits.com. 回答1: Selenium does not support sending keys to the browser address bar, unfortunately. Someone suggested a solution with win32com.client library here Haven't tried it myself as I haven't been faced with this situation. The idea is you may need to consider workarounds, as this is outside the scope of

Problem Selecting Okay Button with Python and Selenium

為{幸葍}努か 提交于 2021-01-28 19:33:55
问题 So I have an issue, where I am unable to select the okay from an alert message that pops up in a new window. I don't really know what to make of it and really just want to accept the alert as all of the work has been done to ensure that the removal is processed. The code for the overall script can be found here: https://github.com/Richard-Barrett/ITDataServicesInfra/blob/master/Python/Skyward/Administration/remove_sec_groups_inactive_users.py Code: #!/bin/usr/env python # ====================

How to read the pdf file using selenium

你。 提交于 2021-01-28 19:22:19
问题 I am working on web page over which there is a link, clicking on which it opens a pdf file on new window. I have to read that pdf file to validate some data against the transactions done. One way is to download that file and then use it. Can any one help me out on this. I have to work on IE 11 Thanks in Advance. 回答1: Use PDFBox and FontBox. public String readPDFInURL() throws EmptyFileException, IOException { WebDriver driver = new FirefoxDriver(); // page with example pdf document driver.get

How to get parent element text and remove child element text selenium c#?

冷暖自知 提交于 2021-01-28 19:09:43
问题 i'm a newbie of automation testing, now i'm using selenium C#. I have a problem, i want to get text from a element, but the code : <div class="item"> Text1 <span>textdontwant</span> </div> and my statement driver.FindElement(By.XPath("//*[@id='contactList']/div[1]/div/div[1]/div/div/div/div[2]")).Text; Get: Text1textdontwant I need only parent element text is : Text1 Anyone have solution? Thanks so much! here HTML: <div id="contactList" class="web z-data-list" tabindex="30" style="position:

Attempting bi-dialect session, assuming Postel's Law holds true on the remote end & Falling back to original OSS JSON using ChromeDriver and Selenium

心已入冬 提交于 2021-01-28 18:35:13
问题 Below is a snippet of code I'm using to initialize chrome webdriver: System.out.println("Initializing Chrome"); ChromeOptions options = new ChromeOptions(); //options.setBinary("C:/Program Files (x86)/Google/Chrome/Application"); options.addArguments("start-maximized"); options.setExperimentalOption("excludeSwitches",new String[]{"enable-automation"}); options.addArguments("--disable-extensions"); options.addArguments("--disable-infobars"); options.addArguments("--allow-running-insecure

Attempting bi-dialect session, assuming Postel's Law holds true on the remote end & Falling back to original OSS JSON using ChromeDriver and Selenium

匆匆过客 提交于 2021-01-28 18:31:31
问题 Below is a snippet of code I'm using to initialize chrome webdriver: System.out.println("Initializing Chrome"); ChromeOptions options = new ChromeOptions(); //options.setBinary("C:/Program Files (x86)/Google/Chrome/Application"); options.addArguments("start-maximized"); options.setExperimentalOption("excludeSwitches",new String[]{"enable-automation"}); options.addArguments("--disable-extensions"); options.addArguments("--disable-infobars"); options.addArguments("--allow-running-insecure