Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Chromedriver launch new tab
#12
Information 
(Feb-16-2019, 01:39 PM)metulburr Wrote: The way you have it coded in your first post you are creating separate processes for every time you hit a button. So for example you keep hitting yahoo and it creates an entire different browser every time. You are going to want to unite them. The best way to do that is a class. This driver = webdriver.Chrome(executable_path=r'chromedriver.exe') being in every function creates a new driver process every time.

Any sample code to achieve this?
I apologies that I am new to python. :x

EDIT:

Now I had follow your advised. I combined them into 1 python script file.
And execute them via CMD function by function like

>> python
>> import sample
>> sample.google
>> sample.baidu
>> sample.yahoo
So these will import the python script and execute function by function, each function will open in new tab and redirect to desire URL.
But somehow, I am finding solution for my another software that designed the GUI, on how to send multiple line of command without open new CMD.
Anyway, I wanna ask if the python script has convert to executable file (sample.py >> sample.exe)
It is possible to execute the sample.exe function by function via CMD, like the CMD shown above?
If can't, then is there anyway to protect my python script similar like executable file?
Thanks.
Reply


Messages In This Thread
Chromedriver launch new tab - by gahhon - Feb-10-2019, 03:57 PM
RE: Chromedriver launch new tab - by Larz60+ - Feb-10-2019, 06:31 PM
RE: Chromedriver launch new tab - by metulburr - Feb-10-2019, 06:39 PM
RE: Chromedriver launch new tab - by gahhon - Feb-11-2019, 02:55 PM
RE: Chromedriver launch new tab - by metulburr - Feb-11-2019, 09:21 PM
RE: Chromedriver launch new tab - by gahhon - Feb-13-2019, 02:08 PM
RE: Chromedriver launch new tab - by metulburr - Feb-13-2019, 10:35 PM
RE: Chromedriver launch new tab - by gahhon - Feb-14-2019, 04:09 PM
RE: Chromedriver launch new tab - by metulburr - Feb-15-2019, 04:56 PM
RE: Chromedriver launch new tab - by gahhon - Feb-16-2019, 07:39 AM
RE: Chromedriver launch new tab - by metulburr - Feb-16-2019, 01:39 PM
RE: Chromedriver launch new tab - by gahhon - Feb-16-2019, 07:00 PM
RE: Chromedriver launch new tab - by gahhon - Feb-16-2019, 10:04 PM
RE: Chromedriver launch new tab - by metulburr - Feb-17-2019, 12:04 AM
RE: Chromedriver launch new tab - by gahhon - Feb-17-2019, 04:13 PM
RE: Chromedriver launch new tab - by metulburr - Feb-17-2019, 06:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Selenium undetected Chromedriver Bot Laurin0000 1 4,108 Apr-13-2023, 09:20 PM
Last Post: Clixmaster
  enable flash using selenium chromedriver Fre3k 1 4,300 Nov-27-2020, 12:15 PM
Last Post: JellyCreeper6
  WebDriverException: 'chromedriver' executable needs to be in PATH pyzyx3qwerty 9 12,781 Jun-09-2020, 05:43 PM
Last Post: Yoriz
  Selenium Chromedriver Automation Help lessthanthree 1 2,164 May-05-2020, 11:03 PM
Last Post: Larz60+
  How to identify chromedriver version? metulburr 2 7,694 Jun-13-2019, 11:37 PM
Last Post: metulburr
  chromedriver.exe issue gahhon 2 2,844 Feb-12-2019, 12:09 PM
Last Post: metulburr
  Selenium chromedriver and click action Gilles95 4 13,309 Feb-07-2018, 07:28 PM
Last Post: Gilles95

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020