1

1

I'm using seleniumbase to do automated testing. When a web page has a side page, the click function seems to be unable to open the side page in the browser, is there any way to open the side page and perform operations such as clicking and asserting on it

I set a long wait and the side page didn't load, I guess the problem is not about the time

vimuth
  • 5,064
  • 33
  • 79
  • 116
  • What do you mean by a "side page"? And have you tried using the [SeleniumBase Recorder](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/recorder_mode.md) to generate a working script for you? – Michael Mintz Mar 08 '23 at 02:32
  • Yes, i have used the SeleniumBase Recorder, it didn't work in this situation, let me see if i can post a picture to make it clear. @Michael Mintz – caicaiprogrammer Mar 08 '23 at 03:14
  • I tried double-clicking and found that the position of the click may have drifted. Is this possible?@Michael Mintz – caicaiprogrammer Mar 09 '23 at 06:26
  • What error message are you seeing when you try to click? – Michael Mintz Mar 09 '23 at 13:59
  • error massage: exception = message = 'Element {div.side-page-header-tabs div div div div:nth-of-type(5)} was not present after 7 seconds!' I want to click to open the "side page", and the error occurs on the next line, because the content of the side page is not loaded – caicaiprogrammer Mar 13 '23 at 07:58
  • Sounds like you either need to wait longer for something to load, or you're using an incorrect selector. If the element you want to interact with is in an iframe, you need to switch to the frame first. If the element is inside Shadow DOM, then you need to specify that when interacting with the element. – Michael Mintz Mar 13 '23 at 16:21
  • Indeed! The selector is incorrect, some options can be clicked, others can't. I don't know why, hhh – caicaiprogrammer Mar 14 '23 at 06:43

0 Answers0