Open umari06 opened 2 years ago
user-data-dir
cannot be shared.
And you have to use userDataDir
parameter, and driver.GoToUrl()
method.
Try it.
#multiple-instance-example
i can login in tiktok but when i click like buton after few second disliked auto any idea d.findelement(By.id( "id")).click();
I don't understand.
But you can refer WebDriverWait
,
Trigger some event after waiting for disliked to appear.
i click button Like❤️ after few second disliked auto maybe from tiktok do u have any code
if u have time add me on discord AgimBaba#3200
Sorry this question is far away from this repo, I can't help you more.
i open undetected chrome then i login in tiktok i click Like button of random video direct with mouse after 10 sec disliked auto
o
The first step, you can try to let selenium to click the like button.
Tiktok is detecting that chrome is bot cuz i try i normal chrome that is installed in my pc i like may video and like stay forever but in selenium undetected i can just login but tiktok not letting me to like
i use this code same thing not lett me to like
d.findelement(By.id( "id")).click();
Ok, I understand what you mean.
Can you put some code about UndetectedChromeDriver?
i dont understand what you mean
I need your test code,
maybe I can find some clues from this,
for example some options may be detected by website.
--disable-gpu
using System;
using OpenQA.Selenium;
using OpenQA.Selenium.Support;
using OpenQA.Selenium.Chrome;
using SeleniumUndetectedChromeDriver;
namespace cns_console
{
internal class Program
{
static void Main(string[] args)
{
var driverExecutablePath = $@"C:\SeleniumProfiles\chromedriver.exe";
var options = new ChromeOptions();
options.AddArgument(@"--user-data-dir=C:\SeleniumProfiles\testundec");
options.AddArgument("--mute-audio");
options.AddArgument("--disable-gpu");
options.AddArgument("--disable-dev-shm-usage"); // i remove 3 option same detected
using var driver = UndetectedChromeDriver.Create( options: options, driverExecutablePath: driverExecutablePath);
driver.GoToUrl("");
...
}
}
}
also i try in python
import undetected_chromedriver as webdriver
import time
if __name__ == '__main__':
options = webdriver.ChromeOptions()
options.add_argument('user-data-dir=C:\\SeleniumProfile\\test1')
options.add_argument('profile-directory=Profile 1')
options.page_load_strategy = "none"
driver = webdriver.Chrome(executable_path=r'C:\SeleniumProfiles\chromedriver.exe', options=options)
time.sleep(1)
driver.get('')
time.sleep(10)
...
not working for me after i click LIKE button tiktok detected and remove like auto after few sec
I try it.
This is a problem with --disable-gpu
.
I released a new package, you can try it.
PM> Install-Package Selenium.UndetectedChromeDriver -Version 1.0.6
Don't use any options.
var userDataDir = @"C:\SeleniumProfiles\testundec";
using var driver = UndetectedChromeDriver.Create(
userDataDir: userDataDir,
driverExecutablePath: driverExecutablePath);
i make code for 2 profiles and first one start and go in url correctly but the seconde one opened and stuck in url
error is here![Untitled11](https://user-images.githubusercontent.com/105589015/177018523-eec7874b-6042-4883-8a17-efbff8f77b50.png)